transform marker sync for extend and grab is back.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 16 Mar 2010 18:01:22 +0000 (18:01 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 16 Mar 2010 18:01:22 +0000 (18:01 +0000)
(commit 27537 by Campbell from render25 branch)

release/scripts/ui/space_sequencer.py
source/blender/editors/transform/transform_conversions.c
source/blender/makesrna/intern/rna_space.c

index 2eb889d2c1dbee450a3bccc7b506bda10a8115d8..6398344e2f746ec701f79bcc6c2b21426b7d6ba4 100644 (file)
@@ -136,6 +136,8 @@ class SEQUENCER_MT_view(bpy.types.Menu):
             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")
index 9c570e10406c1f5e6815ac2b370981035ae5d235..4e4fd0c24ae4a48f187720d638f9ec9729026c62 100644 (file)
@@ -3847,6 +3847,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
                }
        } else {
 
+               t->frame_side= 'B';
+
                /* *** Normal Transform *** */
 
                if (seq->depth == 0) {
@@ -4708,6 +4710,24 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
        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 */
index 3e8c4250c1c5b1f25a925fa7ed8c1e5efa3faf97..fb59cc77611571519fca5ad706c107ebec4a37f7 100644 (file)
@@ -1276,7 +1276,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
        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);