[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46801] trunk/blender: Sequencer UI:

Thomas Dinges blender at dingto.org
Sun May 20 02:34:54 CEST 2012


Revision: 46801
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46801
Author:   dingto
Date:     2012-05-20 00:34:54 +0000 (Sun, 20 May 2012)
Log Message:
-----------
Sequencer UI:
* Code cleanup
* Fixed wrong label for Inverse Select in the Select menu
* Some layout tweaks for space saving and avoid abbreviations in the UI.
* "Image Offset" and "Image Crop" buttons were there twice, once in the Strip Input panel and once in the Effect Strip panel, show it in the Strip Input panel only now. 
* Commented the third input fields ("input_3"), only used by the deprecated plugin system according to an RNA comment. 

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
    trunk/blender/source/blender/makesrna/intern/rna_sequencer.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-05-19 23:11:46 UTC (rev 46800)
+++ trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-05-20 00:34:54 UTC (rev 46801)
@@ -153,7 +153,7 @@
         layout.operator_menu_enum("sequencer.select_grouped", "type", text="Grouped")
         layout.operator("sequencer.select_linked")
         layout.operator("sequencer.select_all").action = 'TOGGLE'
-        layout.operator("sequencer.select_all").action = 'INVERT'
+        layout.operator("sequencer.select_all", text="Invert Selection").action = 'INVERT'
 
 
 class SEQUENCER_MT_marker(Menu):
@@ -346,6 +346,7 @@
 
     def draw(self, context):
         layout = self.layout
+        
         scene = context.scene
         frame_current = scene.frame_current
         strip = act_strip(context)
@@ -394,7 +395,7 @@
             elem = strip.elements[0]
 
         if elem and elem.orig_width > 0 and elem.orig_height > 0:
-            col.label(text="Orig Dim" + ": %dx%d" % (elem.orig_width, elem.orig_height))
+            col.label(text="Original Dimension" + ": %dx%d" % (elem.orig_width, elem.orig_height))
         else:
             col.label(text="Orig Dim: None")
 
@@ -413,7 +414,6 @@
 
         return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
-                              'PLUGIN',
                               'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
                               'MULTICAM', 'ADJUSTMENT'}
 
@@ -426,14 +426,11 @@
             col.prop(strip, "input_1")
             if strip.input_count > 1:
                 col.prop(strip, "input_2")
-            if strip.input_count > 2:
-                col.prop(strip, "input_3")
 
         if strip.type == 'COLOR':
             layout.prop(strip, "color")
 
         elif strip.type == 'WIPE':
-
             col = layout.column()
             col.prop(strip, "transition_type")
             col.label(text="Direction:")
@@ -469,8 +466,35 @@
             #layout.prop(strip, "use_frame_blend")
 
         elif strip.type == 'TRANSFORM':
-            self.draw_panel_transform(strip)
+            layout = self.layout
+            col = layout.column()
+    
+            col.prop(strip, "interpolation")
+            col.prop(strip, "translation_unit")
+            col = layout.column(align=True)
+            col.label(text="Position:")
+            col.prop(strip, "translate_start_x", text="X")
+            col.prop(strip, "translate_start_y", text="Y")
 
+            layout.separator()
+    
+            col = layout.column(align=True)
+            col.prop(strip, "use_uniform_scale")
+            if (strip.use_uniform_scale):
+                col = layout.column(align=True)
+                col.prop(strip, "scale_start_x", text="Scale")
+            else:
+                col = layout.column(align=True)
+                col.label(text="Scale:")
+                col.prop(strip, "scale_start_x", text="X")
+                col.prop(strip, "scale_start_y", text="Y")
+
+            layout.separator()
+
+            col = layout.column(align=True)
+            col.label(text="Rotation:")
+            col.prop(strip, "rotation_start", text="Rotation")
+
         elif strip.type == 'MULTICAM':
             layout.prop(strip, "multicam_source")
 
@@ -492,51 +516,7 @@
             if not strip.use_default_fade:
                 col.prop(strip, "effect_fader", text="Effect fader")
 
-        layout.prop(strip, "use_translation", text="Image Offset:")
-        if strip.use_translation:
-            col = layout.column(align=True)
-            col.prop(strip.transform, "offset_x", text="X")
-            col.prop(strip.transform, "offset_y", text="Y")
 
-        layout.prop(strip, "use_crop", text="Image Crop:")
-        if strip.use_crop:
-            col = layout.column(align=True)
-            col.prop(strip.crop, "max_y")
-            col.prop(strip.crop, "min_x")
-            col.prop(strip.crop, "min_y")
-            col.prop(strip.crop, "max_x")
-
-    def draw_panel_transform(self, strip):
-        layout = self.layout
-        col = layout.column()
-
-        col.prop(strip, "interpolation")
-        col.prop(strip, "translation_unit")
-        col = layout.column(align=True)
-        col.label(text="Position:")
-        col.prop(strip, "translate_start_x", text="X")
-        col.prop(strip, "translate_start_y", text="Y")
-
-        layout.separator()
-
-        col = layout.column(align=True)
-        col.prop(strip, "use_uniform_scale")
-        if (strip.use_uniform_scale):
-            col = layout.column(align=True)
-            col.prop(strip, "scale_start_x", text="Scale")
-        else:
-            col = layout.column(align=True)
-            col.label(text="Scale:")
-            col.prop(strip, "scale_start_x", text="X")
-            col.prop(strip, "scale_start_y", text="Y")
-
-        layout.separator()
-
-        col = layout.column(align=True)
-        col.label(text="Rotation:")
-        col.prop(strip, "rotation_start", text="Rotation")
-
-
 class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
     bl_label = "Strip Input"
 
@@ -552,7 +532,7 @@
         return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'MOVIECLIP', 'META',
                               'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
-                              'WIPE', 'GLOW', 'TRANSFORM',
+                              'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
                               'MULTICAM', 'SPEED', 'ADJUSTMENT'}
 
     def draw(self, context):
@@ -565,43 +545,34 @@
         # draw a filename if we have one
         if seq_type == 'IMAGE':
             split = layout.split(percentage=0.2)
-            col = split.column()
-            col.label(text="Path:")
-            col = split.column()
-            col.prop(strip, "directory", text="")
+            split.label(text="Path:")
+            split.prop(strip, "directory", text="")
 
             # Current element for the filename
 
             elem = strip.getStripElem(context.scene.frame_current)
             if elem:
                 split = layout.split(percentage=0.2)
-                col = split.column()
-                col.label(text="File:")
-                col = split.column()
-                col.prop(elem, "filename", text="")  # strip.elements[0] could be a fallback
+                split.label(text="File:")
+                split.prop(elem, "filename", text="")  # strip.elements[0] could be a fallback
 
-            # also accessible from the menu
             layout.operator("sequencer.change_path")
 
         elif seq_type == 'MOVIE':
             split = layout.split(percentage=0.2)
-            col = split.column()
-            col.label(text="Path:")
-            col = split.column()
-            col.prop(strip, "filepath", text="")
-            col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
-            col.prop(strip, "stream_index", text="Stream Index")
-
-        # TODO, sound???
-        # end drawing filename
-
-        layout.prop(strip, "use_translation", text="Image Offset:")
+            split.label(text="Path:")
+            split.prop(strip, "filepath", text="")
+            
+            layout.prop(strip, "mpeg_preseek")
+            layout.prop(strip, "stream_index")
+        
+        layout.prop(strip, "use_translation", text="Image Offset")
         if strip.use_translation:
             col = layout.column(align=True)
             col.prop(strip.transform, "offset_x", text="X")
             col.prop(strip.transform, "offset_y", text="Y")
 
-        layout.prop(strip, "use_crop", text="Image Crop:")
+        layout.prop(strip, "use_crop", text="Image Crop")
         if strip.use_crop:
             col = layout.column(align=True)
             col.prop(strip.crop, "max_y")
@@ -734,15 +705,17 @@
             col = layout.column()
             col.label(text="Distortion:")
             col.prop(strip, "undistort")
+            
+        split = layout.split(percentage=0.65)
 
-        row = layout.row()
-        row.label(text="Flip:")
-        row.prop(strip, "use_flip_x", text="X")
-        row.prop(strip, "use_flip_y", text="Y")
-
-        col = layout.column()
+        col = split.column()
         col.prop(strip, "use_reverse_frames", text="Backwards")
         col.prop(strip, "use_deinterlace")
+        
+        col = split.column()
+        col.label(text="Flip:")
+        col.prop(strip, "use_flip_x", text="X")
+        col.prop(strip, "use_flip_y", text="Y")
 
         col = layout.column()
         col.label(text="Colors:")
@@ -835,15 +808,7 @@
         #col.active = render.use_sequencer_gl_preview
         col.prop(render, "sequencer_gl_preview", text="")
 
-        '''
-        col = layout.column()
-        col.prop(render, "use_sequencer_gl_render", text="Open GL Render")
-        col = layout.column()
-        col.active = render.use_sequencer_gl_render
-        col.prop(render, "sequencer_gl_render", text="")
-        '''
 
-
 class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel):
     bl_label = "View Settings"
 
@@ -854,9 +819,9 @@
 
         col = layout.column()
         if st.display_mode == 'IMAGE':
-            col.prop(st, "draw_overexposed")  # text="Zebra"
+            col.prop(st, "draw_overexposed")
             col.prop(st, "show_safe_margin")
-        if st.display_mode == 'WAVEFORM':
+        elif st.display_mode == 'WAVEFORM':
             col.prop(st, "show_separate_color")
         col.prop(st, "proxy_render_size")
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2012-05-19 23:11:46 UTC (rev 46800)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2012-05-20 00:34:54 UTC (rev 46801)
@@ -1374,12 +1374,14 @@
 		RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
 	}
 
-	if (count == 3) { /* not used by any effects ...except maybe plugins? */
+	/*
+	if (count == 3) { // not used by any effects ...except maybe plugins? 
 		prop = RNA_def_property(srna, "input_3",  PROP_POINTER, PROP_NONE);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list