[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27557] trunk/blender: transform marker sync for extend and grab is back.

Brecht Van Lommel brecht at blender.org
Tue Mar 16 19:01:22 CET 2010


Revision: 27557
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27557
Author:   blendix
Date:     2010-03-16 19:01:22 +0100 (Tue, 16 Mar 2010)

Log Message:
-----------
transform marker sync for extend and grab is back.
(commit 27537 by Campbell from render25 branch)

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_sequencer.py
    trunk/blender/source/blender/editors/transform/transform_conversions.c
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/scripts/ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/ui/space_sequencer.py	2010-03-16 18:00:45 UTC (rev 27556)
+++ trunk/blender/release/scripts/ui/space_sequencer.py	2010-03-16 18:01:22 UTC (rev 27557)
@@ -136,6 +136,8 @@
             layout.prop(st, "separate_color_preview")
 
         layout.separator()
+        layout.prop(st, "use_marker_sync")
+        layout.separator()
 
         layout.operator("screen.area_dupli")
         layout.operator("screen.screen_full_area")

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c	2010-03-16 18:00:45 UTC (rev 27556)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c	2010-03-16 18:01:22 UTC (rev 27557)
@@ -3847,6 +3847,8 @@
 		}
 	} else {
 
+		t->frame_side= 'B';
+
 		/* *** Normal Transform *** */
 
 		if (seq->depth == 0) {
@@ -4708,6 +4710,24 @@
 	if (t->spacetype == SPACE_SEQ) {
 		/* freeSeqData in transform_conversions.c does this
 		 * keep here so the else at the end wont run... */
+
+		SpaceSeq *sseq= (SpaceSeq *)t->sa->spacedata.first;
+
+		/* marker transform, not especially nice but we may want to move markers
+		 * at the same time as keyframes in the dope sheet. */
+		if ((sseq->flag & SEQ_MARKER_TRANS) && (cancelled == 0)) {
+			/* cant use , TFM_TIME_EXTEND
+			 * for some reason EXTEND is changed into TRANSLATE, so use frame_side instead */
+
+			if(t->mode == TFM_SEQ_SLIDE) {
+				if(t->frame_side == 'B')
+					scene_marker_tfm_translate(t->scene, floor(t->values[0] + 0.5f), SELECT);
+			}
+			else if (ELEM(t->frame_side, 'L', 'R')) {
+				scene_marker_tfm_extend(t->scene, floor(t->vec[0] + 0.5f), SELECT, t->scene->r.cfra, t->frame_side);
+			}
+		}
+
 	}
 	else if (t->spacetype == SPACE_NODE) {
 		/* pass */

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c	2010-03-16 18:00:45 UTC (rev 27556)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c	2010-03-16 18:01:22 UTC (rev 27557)
@@ -1276,7 +1276,7 @@
 	RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather then seconds");
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
 	
-	prop= RNA_def_property(srna, "transform_markers", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
 	RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips");
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);





More information about the Bf-blender-cvs mailing list