== Armature - Duplicating Bones ==
authorJoshua Leung <aligorith@gmail.com>
Thu, 14 Jun 2007 12:29:56 +0000 (12:29 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 14 Jun 2007 12:29:56 +0000 (12:29 +0000)
Duplicating bones now also duplicates the Transform Locks, and IK DOF settings, along with constraints.

I have noticed a few random crashes while editing armatures recently, that seem to occur after duplicating a chain of bones. I've yet to find the cause though.

source/blender/src/editarmature.c

index c7b818482bda00b02e6205a0ca57051af4aab622..338147827da6a88ece3cebf1e8ccd17d621286c7 100644 (file)
@@ -1629,6 +1629,17 @@ void adduplicate_armature(void)
                                                        channew = 
                                                                verify_pose_channel(OBACT->pose, eBone->name);
                                                        if (channew) {
+                                                               /* copy transform locks */
+                                                               channew->protectflag = chanold->protectflag;
+                                                               
+                                                               /* ik (dof) settings */
+                                                               channew->ikflag = chanold->ikflag;
+                                                               VECCOPY(channew->limitmin, chanold->limitmin);
+                                                               VECCOPY(channew->limitmax, chanold->limitmax);
+                                                               VECCOPY(channew->stiffness, chanold->stiffness);
+                                                               channew->ikstretch= chanold->ikstretch;
+                                                               
+                                                               /* constraints */
                                                                listnew = &channew->constraints;
                                                                copy_constraints (listnew, listold);
                                                        }