Fix T52588: Shape key value driver variables of duplicated object sets refer to old...
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 30 Aug 2017 15:24:06 +0000 (17:24 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 30 Aug 2017 15:24:06 +0000 (17:24 +0200)
Regression since 2.78, to be backported to 2.79.

source/blender/editors/object/object_add.c

index e4f6d0da38ffdb9c034b3627d1056850fa05cf46..74da681718550947150f72d7abccf4962b687daa 100644 (file)
@@ -2189,6 +2189,11 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
                if (didit) {
                        Key *key = BKE_key_from_object(obn);
 
+                       Key *oldkey = BKE_key_from_object(ob);
+                       if (oldkey != NULL) {
+                               ID_NEW_SET(oldkey, key);
+                       }
+
                        if (dupflag & USER_DUP_ACT) {
                                bActuator *act;