[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30253] trunk/blender: sequencer ui tweaks & display frame position of the playhead in a strip, helpful for working out the exact frame of an avi <> exr

Campbell Barton ideasman42 at gmail.com
Tue Jul 13 10:20:34 CEST 2010


Revision: 30253
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30253
Author:   campbellbarton
Date:     2010-07-13 10:20:34 +0200 (Tue, 13 Jul 2010)

Log Message:
-----------
sequencer ui tweaks & display frame position of the playhead in a strip, helpful for working out the exact frame of an avi <> exr

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

Modified: trunk/blender/release/scripts/ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/ui/space_sequencer.py	2010-07-13 04:58:56 UTC (rev 30252)
+++ trunk/blender/release/scripts/ui/space_sequencer.py	2010-07-13 08:20:34 UTC (rev 30253)
@@ -336,7 +336,9 @@
 
     def draw(self, context):
         layout = self.layout
+        scene = context.scene
         render = context.scene.render
+        frame_current = scene.frame_current
         strip = act_strip(context)
 
         split = layout.split(percentage=0.3)
@@ -351,37 +353,30 @@
         split.label(text="Blend:")
         split.prop(strip, "blend_mode", text="")
 
-        row = layout.row()
-        if strip.mute == True:
-            row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON', text="")
-        elif strip.mute is False:
-            row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_OFF', text="")
-
+        row = layout.row(align=True)
         sub = row.row()
         sub.active = (not strip.mute)
-
         sub.prop(strip, "blend_opacity", text="Opacity", slider=True)
+        sub = row.row()
+        row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
+        row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
 
-        row = layout.row()
-        row.prop(strip, "lock")
-
         col = layout.column()
-        col.enabled = not strip.lock
-        col.prop(strip, "channel")
-        col.prop(strip, "frame_start")
-        subrow = col.split(percentage=0.66)
-        subrow.prop(strip, "frame_final_length")
-        subrow.label(text="%.2f sec" % (strip.frame_final_length / (render.fps / render.fps_base)))
+        sub = col.column()
+        sub.enabled = not strip.lock
+        sub.prop(strip, "channel")
+        sub.prop(strip, "frame_start")
+        sub.prop(strip, "frame_final_length")
 
         col = layout.column(align=True)
-        col.label(text="Offset:")
-        col.prop(strip, "frame_offset_start", text="Start")
-        col.prop(strip, "frame_offset_end", text="End")
+        row = col.row()
+        row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_length))
+        row = col.row()
+        row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_length)
+        row.label(text="Strip Position: %d" % (frame_current - strip.frame_start))
 
-        col = layout.column(align=True)
-        col.label(text="Still:")
-        col.prop(strip, "frame_still_start", text="Start")
-        col.prop(strip, "frame_still_end", text="End")
+        col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
+        col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
 
 
 class SEQUENCER_PT_preview(bpy.types.Panel):
@@ -552,16 +547,14 @@
         self.draw_filename(context)
 
         layout.prop(strip, "use_translation", text="Image Offset:")
-        if strip.transform:
+        if strip.use_translation:
             col = layout.column(align=True)
-            col.active = strip.use_translation
             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.crop:
+        if strip.use_crop:
             col = layout.column(align=True)
-            col.active = strip.use_crop
             col.prop(strip.crop, "top")
             col.prop(strip.crop, "left")
             col.prop(strip.crop, "bottom")

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2010-07-13 04:58:56 UTC (rev 30252)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2010-07-13 08:20:34 UTC (rev 30253)
@@ -846,7 +846,7 @@
 	prop= RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
 	RNA_def_property_int_sdna(prop, NULL, "endofs");
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
-	RNA_def_property_ui_text(prop, "End offset", "");
+	RNA_def_property_ui_text(prop, "End Offset", "");
 	RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
 	
 	prop= RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);





More information about the Bf-blender-cvs mailing list