Duplicating bones in EditMode didn't set the custom-shape and bone-groups too.
[blender.git] / source / blender / src / editarmature.c
index 18f4bc3f8dd403b4920a8f8ff99ecf539a3ac472..0b8c1339daed3614b67b9c8f6e31b1bbe8723ec0 100644 (file)
@@ -2278,7 +2278,7 @@ void adduplicate_armature(void)
                                        bPoseChannel *chanold, *channew;
                                        ListBase     *listold, *listnew;
                                        
-                                       chanold = verify_pose_channel (OBACT->pose, curBone->name);
+                                       chanold = verify_pose_channel(OBACT->pose, curBone->name);
                                        if (chanold) {
                                                listold = &chanold->constraints;
                                                if (listold) {
@@ -2291,6 +2291,9 @@ void adduplicate_armature(void)
                                                                /* copy transform locks */
                                                                channew->protectflag = chanold->protectflag;
                                                                
+                                                               /* copy bone group */
+                                                               channew->agrp_index= chanold->agrp_index;
+                                                               
                                                                /* ik (dof) settings */
                                                                channew->ikflag = chanold->ikflag;
                                                                VECCOPY(channew->limitmin, chanold->limitmin);
@@ -2300,7 +2303,10 @@ void adduplicate_armature(void)
                                                                
                                                                /* constraints */
                                                                listnew = &channew->constraints;
-                                                               copy_constraints (listnew, listold);
+                                                               copy_constraints(listnew, listold);
+                                                               
+                                                               /* custom shape */
+                                                               channew->custom= chanold->custom;
                                                        }
                                                }
                                        }