Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2010-10-18 14:52:57 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-10-18 14:52:57 +0400
commit9650667b3df2f39c35b7632720ff872265dfeaa5 (patch)
tree7c326e971ca2da57e4bbdc664b4e5a752112fd97
parentc092a18fcbfead6ed2936c74f504ece9f08e96d2 (diff)
[#21475] Moving a Transform strip upwards moves its animation sidewards
* F-Curve translation is now calculated from the difference of the strips original & resulting start time, instead of using the transform data directly.
-rw-r--r--source/blender/editors/transform/transform_conversions.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 5de08d7832c..d723f77f537 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2284,11 +2284,10 @@ void flushTransNodes(TransInfo *t)
}
/* *** SEQUENCE EDITOR *** */
-#define XXX_DURIAN_ANIM_TX_HACK
void flushTransSeq(TransInfo *t)
{
ListBase *seqbasep= seq_give_editing(t->scene, FALSE)->seqbasep; /* Editing null check already done */
- int a, new_frame;
+ int a, new_frame, old_start;
TransData *td= NULL;
TransData2D *td2d= NULL;
TransDataSeq *tdsq= NULL;
@@ -2305,16 +2304,11 @@ void flushTransSeq(TransInfo *t)
for(a=0, td= t->data, td2d= t->data2d; a<t->total; a++, td++, td2d++) {
tdsq= (TransDataSeq *)td->extra;
seq= tdsq->seq;
+ old_start = seq->start;
new_frame= (int)floor(td2d->loc[0] + 0.5f);
switch (tdsq->sel_flag) {
case SELECT:
-#ifdef XXX_DURIAN_ANIM_TX_HACK
- if (seq != seq_prev) {
- int ofs = (new_frame - tdsq->start_offset) - seq->start; // breaks for single strips - color/image
- seq_offset_animdata(t->scene, seq, ofs);
- }
-#endif
if (seq->type != SEQ_META && (seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */
seq->start= new_frame - tdsq->start_offset;
@@ -2345,6 +2339,9 @@ void flushTransSeq(TransInfo *t)
else {
calc_sequence_disp(t->scene, seq);
}
+
+ if(tdsq->sel_flag == SELECT)
+ seq_offset_animdata(t->scene, seq, seq->start - old_start);
}
seq_prev= seq;
}
@@ -3851,6 +3848,7 @@ static short constraints_list_needinv(TransInfo *t, ListBase *list)
* seq->depth must be set before running this function so we know if the strips
* are root level or not
*/
+#define XXX_DURIAN_ANIM_TX_HACK
static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count, int *flag)
{