Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-22 22:04:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-22 22:04:35 +0400
commit4966982a5aa7715e6bd67dcef1babdf8ca3d02e9 (patch)
treecf96f67b83f89336e3fe2f64aa58345dca818430 /source/blender/editors/object/object_add.c
parent0198df7956125180d5b9c50638a0778a3236d88f (diff)
parentdf51fd74cf826c42a90212082abb27e99484257a (diff)
svn merge ^/trunk/blender -r43564:43609
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r--source/blender/editors/object/object_add.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index f96da9e5b07..1b289732302 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -46,6 +46,7 @@
#include "DNA_scene_types.h"
#include "DNA_speaker_types.h"
#include "DNA_vfont_types.h"
+#include "DNA_actuator_types.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
@@ -1795,8 +1796,22 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
Key *key = ob_get_key(obn);
if(dupflag & USER_DUP_ACT) {
+ bActuator *act;
+
BKE_copy_animdata_id_action((ID *)obn->data);
- if(key) BKE_copy_animdata_id_action((ID*)key);
+ if(key) {
+ BKE_copy_animdata_id_action((ID*)key);
+ }
+
+ /* Update the duplicated action in the action actuators */
+ for (act = obn->actuators.first; act; act = act->next) {
+ if(act->type == ACT_ACTION) {
+ bActionActuator* actact = (bActionActuator*) act->data;
+ if(actact->act == ob->adt->action) {
+ actact->act = obn->adt->action;
+ }
+ }
+ }
}
if(dupflag & USER_DUP_MAT) {