diff --git a/tests/python/compositor_cpu_render_tests.py b/tests/python/compositor_cpu_render_tests.py index d9abae801fd..ab5ca4ec03e 100644 --- a/tests/python/compositor_cpu_render_tests.py +++ b/tests/python/compositor_cpu_render_tests.py @@ -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"] diff --git a/tests/python/compositor_realtime_render_tests.py b/tests/python/compositor_realtime_render_tests.py index 17de8393e09..04e67e21bb1 100644 --- a/tests/python/compositor_realtime_render_tests.py +++ b/tests/python/compositor_realtime_render_tests.py @@ -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"