Compositor: Explicitly set device in test scripts
This patch explicitly sets the compositing device in the compositor test scripts. This is done to make the tests more robust, since a developer might accordantly save a file with a different device.
This commit is contained in:
@@ -15,6 +15,9 @@ try:
|
||||
except ImportError:
|
||||
inside_blender = False
|
||||
|
||||
SET_COMPOSITOR_DEVICE_SCRIPT = "import bpy; " \
|
||||
"bpy.data.scenes[0].render.compositor_device = 'CPU'"
|
||||
|
||||
|
||||
def get_arguments(filepath, output_filepath):
|
||||
return [
|
||||
@@ -24,8 +27,8 @@ def get_arguments(filepath, output_filepath):
|
||||
"--debug-memory",
|
||||
"--debug-exit-on-error",
|
||||
filepath,
|
||||
"-P",
|
||||
os.path.realpath(__file__),
|
||||
"-P", os.path.realpath(__file__),
|
||||
"--python-expr", SET_COMPOSITOR_DEVICE_SCRIPT,
|
||||
"-o", output_filepath,
|
||||
"-F", "PNG",
|
||||
"-f", "1"]
|
||||
|
||||
@@ -15,7 +15,7 @@ try:
|
||||
except ImportError:
|
||||
inside_blender = False
|
||||
|
||||
ENABLE_REALTIME_COMPOSITOR_SCRIPT = "import bpy; " \
|
||||
SET_COMPOSITOR_DEVICE_SCRIPT = "import bpy; " \
|
||||
"bpy.data.scenes[0].render.compositor_device = 'GPU'"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ def get_arguments(filepath, output_filepath):
|
||||
"--debug-exit-on-error",
|
||||
filepath,
|
||||
"-P", os.path.realpath(__file__),
|
||||
"--python-expr", ENABLE_REALTIME_COMPOSITOR_SCRIPT,
|
||||
"--python-expr", SET_COMPOSITOR_DEVICE_SCRIPT,
|
||||
"-o", output_filepath,
|
||||
"-F", "PNG",
|
||||
"-f", "1"
|
||||
|
||||
Reference in New Issue
Block a user