Small fix for #1628
authorTon Roosendaal <ton@blender.org>
Sat, 16 Oct 2004 19:14:39 +0000 (19:14 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 16 Oct 2004 19:14:39 +0000 (19:14 +0000)
Constraints on an object with hooks (or other deformer) didnt update
OK while transform(). The fix is easy code to isolate for Martin, so
hopefully he can find integrated solution in transform() refactor :)

source/blender/src/editobject.c

index dab2366a36347926e1726febd2c339e39f017ffb..04e07bb5b5af6c53825bacae056210f316cfd2ea 100644 (file)
@@ -3447,6 +3447,8 @@ static int pose_do_update_flag(Object *ob) {
        return do_update;
 }
 
+/* this is a confusing call, it also does the constraint update flags, but was not used...
+   hopefully transform refactor will take care better of it (ton) */
 void figure_pose_updating(void)
 {
        Base *base;
@@ -3457,8 +3459,17 @@ void figure_pose_updating(void)
                /* Recalculate the pose if necessary, regardless of
                 * whether the layer is visible or not.
                 */
-               if (pose_do_update_flag(base->object))
+               if (pose_do_update_flag(base->object)) {
                        base->flag |= BA_WHERE_UPDATE;
+               }
+               else if(base->object->flag & OB_GONNA_MOVE) {
+                       /* if position updates, deform info could change too */
+                       if(base->object->hooks.first) base->flag |= BA_DISP_UPDATE;
+                       else if(base->object->parent) {
+                               if(base->object->parent->type==OB_LATTICE || base->object->partype==PARSKEL)
+                                       base->flag |= BA_DISP_UPDATE;
+                       }
+               }
        }
 
 }