Fix #36793: missing update on undo with proxy object that is not using a proxy group.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 23 Sep 2013 21:55:56 +0000 (21:55 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 23 Sep 2013 21:55:56 +0000 (21:55 +0000)
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/object.c

index 13181662bd8687264080f36ff7a09b153dcf81ed..cb7b4a32feb37c280327bcace7d1036640a92258 100644 (file)
@@ -2115,6 +2115,8 @@ void DAG_on_visible_update(Main *bmain, const short do_time)
                        if ((oblay & lay) & ~scene->lay_updated) {
                                if (ELEM6(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
                                        ob->recalc |= OB_RECALC_DATA;
+                               if (ob->proxy && (ob->proxy_group == NULL))
+                                       ob->proxy->recalc |= OB_RECALC_DATA;
                                if (ob->dup_group) 
                                        dag_group_on_visible_update(ob->dup_group);
                        }
index d7abdbdea0a0c5736e390aff58b85dbb1b813214..5d0216affca0949e562f9dac3a74bc33907c48c6 100644 (file)
@@ -2835,21 +2835,20 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob,
                        /* quick cache removed */
                }
 
-               /* the no-group proxy case, we call update */
-               if (ob->proxy && ob->proxy_group == NULL) {
-                       /* set pointer in library proxy target, for copying, but restore it */
-                       ob->proxy->proxy_from = ob;
-                       // printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
-                       BKE_object_handle_update(scene, ob->proxy);
-               }
-       
                ob->recalc &= ~OB_RECALC_ALL;
        }
 
        /* the case when this is a group proxy, object_update is called in group.c */
        if (ob->proxy) {
+               /* set pointer in library proxy target, for copying, but restore it */
                ob->proxy->proxy_from = ob;
                // printf("set proxy pointer for later group stuff %s\n", ob->id.name);
+
+               /* the no-group proxy case, we call update */
+               if (ob->proxy_group == NULL) {
+                       // printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
+                       BKE_object_handle_update(scene, ob->proxy);
+               }
        }
 }
 /* WARNING: "scene" here may not be the scene object actually resides in.