[Bf-blender-cvs] [7a9e4e41a92] master: Cleanup: More clear function name

Sergey Sharybin noreply at git.blender.org
Wed Jan 23 17:18:11 CET 2019


Commit: 7a9e4e41a924a1dacb120263ca7181fe69b6a397
Author: Sergey Sharybin
Date:   Wed Jan 23 16:58:37 2019 +0100
Branches: master
https://developer.blender.org/rB7a9e4e41a924a1dacb120263ca7181fe69b6a397

Cleanup: More clear function name

Otherwise it was read as it does select sequences rather
than counts them.

===================================================================

M	release/scripts/startup/bl_ui/space_sequencer.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 741cb49c314..a757bb4c21d 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -35,7 +35,7 @@ def act_strip(context):
         return None
 
 
-def sel_sequences(context):
+def selected_sequences_len(context):
     selected_sequences = getattr(context, "selected_sequences", None)
     if not selected_sequences:
         return 0
@@ -393,7 +393,7 @@ class SEQUENCER_MT_add(Menu):
 
         col = layout.column()
         col.menu("SEQUENCER_MT_add_transitions")
-        col.enabled = sel_sequences(context) >= 2
+        col.enabled = selected_sequences_len(context) >= 2
 
 
 class SEQUENCER_MT_add_empty(Menu):
@@ -419,7 +419,7 @@ class SEQUENCER_MT_add_transitions(Menu):
         col.separator()
 
         col.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE'
-        col.enabled = sel_sequences(context) >= 2
+        col.enabled = selected_sequences_len(context) >= 2
 
 
 class SEQUENCER_MT_add_effect(Menu):
@@ -438,7 +438,7 @@ class SEQUENCER_MT_add_effect(Menu):
         col.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER'
         col.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER'
         col.operator("sequencer.effect_strip_add", text="Color Mix").type = 'COLORMIX'
-        col.enabled = sel_sequences(context) >= 2
+        col.enabled = selected_sequences_len(context) >= 2
 
         layout.separator()
 
@@ -454,7 +454,7 @@ class SEQUENCER_MT_add_effect(Menu):
 
         col.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW'
         col.operator("sequencer.effect_strip_add", text="Gaussian Blur").type = 'GAUSSIAN_BLUR'
-        col.enabled = sel_sequences(context) != 0
+        col.enabled = selected_sequences_len(context) != 0
 
 
 class SEQUENCER_MT_strip_transform(Menu):



More information about the Bf-blender-cvs mailing list