workaround/fix [#24451] Motion path not automatic recalculating + locking obj moving
authorCampbell Barton <ideasman42@gmail.com>
Wed, 3 Nov 2010 23:49:56 +0000 (23:49 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 3 Nov 2010 23:49:56 +0000 (23:49 +0000)
Comment from source...
/* re-calculating the frame positions means we loose our original transform if its not auto-keyed [#24451]
 * this hack re-applies it, which is annoying, only alternatives are...
 * - dont recalc paths.
 * - have an object_handle_update() which gives is the new transform without touching the objects.
 * - only recalc paths on auto-keying.
 * - ED_objects_recalculate_paths could backup/restore transforms.
 * - re-apply the transform which is simplest in this case. (2 lines below)
 */

Martin, if you think this workaround is unacceptable, then automatic recalculating of paths after transform should probably be disabled since it looses data on non transform un-keyed values.

source/blender/editors/transform/transform_conversions.c

index 29496d2aa751bbe044743d2fb8c95cfe3eed4235..edae59fc00c87ea60ad0354705225f4a87b93a4c 100644 (file)
@@ -5085,6 +5085,17 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
                if (C && recalcObPaths) {
                        //ED_objects_clear_paths(C); // XXX for now, don't need to clear
                        ED_objects_recalculate_paths(C, t->scene);
+
+                       /* recalculating the frame positions means we loose our original transform if its not auto-keyed [#24451]
+                        * this hack re-applies it, which is annoying, only alternatives are...
+                        * - dont recalc paths.
+                        * - have an object_handle_update() which gives is the new transform without touching the objects.
+                        * - only recalc paths on auto-keying.
+                        * - ED_objects_recalculate_paths could backup/restore transforms.
+                        * - re-apply the transform which is simplest in this case. (2 lines below)
+                        */
+                       t->redraw |= TREDRAW_HARD;
+                       transformApply(C, t);
                }
        }