From 744f9b403f9124cd0c16484ad66ba79529313db8 Mon Sep 17 00:00:00 2001 From: Nick Alberelli Date: Tue, 30 May 2023 08:23:19 -0400 Subject: [PATCH] Render Review: Always use Video Editing workspace --- scripts-blender/addons/render_review/ops.py | 22 +++++++-------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/scripts-blender/addons/render_review/ops.py b/scripts-blender/addons/render_review/ops.py index 667c6f6c..3f414dd1 100644 --- a/scripts-blender/addons/render_review/ops.py +++ b/scripts-blender/addons/render_review/ops.py @@ -395,22 +395,14 @@ class RR_OT_setup_review_workspace(bpy.types.Operator): def execute(self, context: bpy.types.Context) -> Set[str]: - # Remove non video editing workspaces. - for ws in bpy.data.workspaces: - if ws.name != "Video Editing": - bpy.ops.workspace.delete({"workspace": ws}) + scripts_path = bpy.utils.script_paths(use_user=False)[0] + template_path = "/startup/bl_app_templates_system/Video_Editing/startup.blend" + ws_filepath = Path(scripts_path + template_path) + bpy.ops.workspace.append_activate( + idname="Video Editing", + filepath=ws_filepath.as_posix(), + ) - # Add / load video editing workspace. - if "Video Editing" not in [ws.name for ws in bpy.data.workspaces]: - scripts_path = bpy.utils.script_paths(use_user=False)[0] - template_path = "/startup/bl_app_templates_system/Video_Editing/startup.blend" - ws_filepath = Path(scripts_path + template_path) - bpy.ops.workspace.append_activate( - idname="Video Editing", - filepath=ws_filepath.as_posix(), - ) - else: - context.window.workspace = bpy.data.workspaces["Video Editing"] # Pre-fill render directory with farm output shots directory. addon_prefs = prefs.addon_prefs_get(bpy.context) -- 2.30.2