Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-05-16 20:41:50 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-05-16 20:41:50 +0300
commit205c6d8d0853ada1c3d087b31bb2bec42d5597f1 (patch)
treec488de2ce1281794ba736a778e5802255731b5b7 /release/scripts/startup/bl_ui/space_sequencer.py
parent6065fbb543937ce098981ceb74aeff770b68a6cc (diff)
VSE: New Change Scene option in Change menu
This is a new option in `C` key menu. Reviewed By: mendio, ISS Maniphest Tasks: T97711 Differential Revision: https://developer.blender.org/D14807
Diffstat (limited to 'release/scripts/startup/bl_ui/space_sequencer.py')
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 7c7bb456473..9aeac14ef4b 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -611,7 +611,16 @@ class SEQUENCER_MT_change(Menu):
strip = context.active_sequence_strip
layout.operator_context = 'INVOKE_REGION_WIN'
+ if strip and strip.type == 'SCENE':
+ bpy_data_scenes_len = len(bpy.data.scenes)
+ if bpy_data_scenes_len > 10:
+ layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator("sequencer.change_scene", text="Change Scene...")
+ elif bpy_data_scenes_len > 1:
+ layout.operator_menu_enum("sequencer.change_scene", "scene", text="Change Scene")
+ del bpy_data_scenes_len
+ layout.operator_context = 'INVOKE_DEFAULT'
layout.operator_menu_enum("sequencer.change_effect_input", "swap")
layout.operator_menu_enum("sequencer.change_effect_type", "type")
prop = layout.operator("sequencer.change_path", text="Path/Files")