Commit: c968dae05441b8d2c68916260d728c4a8d01c464
Author: Richard Antalik
Date:   Mon May 23 23:28:21 2022 +0200
Branches: master
https://developer.blender.org/rBc968dae05441b8d2c68916260d728c4a8d01c464

Fix T98141: Strip rotation is limited to +/360 degrees

This limiting prevented visual keyframing from working correctly and is
not consistent with object rotation, so limiting is removed.

===================================================================

M       source/blender/editors/transform/transform_convert_sequencer_image.c

===================================================================

diff --git 
a/source/blender/editors/transform/transform_convert_sequencer_image.c 
b/source/blender/editors/transform/transform_convert_sequencer_image.c
index cbc2cab0a7a..deae51a1149 100644
--- a/source/blender/editors/transform/transform_convert_sequencer_image.c
+++ b/source/blender/editors/transform/transform_convert_sequencer_image.c
@@ -197,11 +197,7 @@ void recalcData_sequencer_image(TransInfo *t)
 
     /* Rotation. Scaling can cause negative rotation. */
     if (t->mode == TFM_ROTATION) {
-      const float orig_dir[2] = {cosf(tdseq->orig_rotation), 
sinf(tdseq->orig_rotation)};
-      float rotation = angle_signed_v2v2(handle_x, orig_dir) * mirror[0] * 
mirror[1];
-      transform->rotation = tdseq->orig_rotation + rotation;
-      transform->rotation += DEG2RAD(360.0);
-      transform->rotation = fmod(transform->rotation, DEG2RAD(360.0));
+      transform->rotation = tdseq->orig_rotation - t->values_final[0];
     }
     SEQ_relations_invalidate_cache_preprocessed(t->scene, seq);
   }
@@ -209,9 +205,6 @@ void recalcData_sequencer_image(TransInfo *t)
 
 void special_aftertrans_update__sequencer_image(bContext *UNUSED(C), TransInfo 
*t)
 {
-  if (t->state == TRANS_CANCEL) {
-    return;
-  }
 
   TransDataContainer *tc = TRANS_DATA_CONTAINER_FIRST_SINGLE(t);
   TransData *td = NULL;
@@ -225,8 +218,14 @@ void special_aftertrans_update__sequencer_image(bContext 
*UNUSED(C), TransInfo *
     TransDataSeq *tdseq = td->extra;
     Sequence *seq = tdseq->seq;
     StripTransform *transform = seq->strip->transform;
-    Scene *scene = t->scene;
+    if (t->state == TRANS_CANCEL) {
+      if (t->mode == TFM_ROTATION) {
+        transform->rotation = tdseq->orig_rotation;
+      }
+      continue;
+    }
 
+    Scene *scene = t->scene;
     RNA_pointer_create(&scene->id, &RNA_SequenceTransform, transform, &ptr);
 
     if (t->mode == TFM_ROTATION) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to