== Add Constraints Menu ==
authorJoshua Leung <aligorith@gmail.com>
Thu, 14 Dec 2006 23:20:47 +0000 (23:20 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 14 Dec 2006 23:20:47 +0000 (23:20 +0000)
Now, it is possible to add action constraints to the last selected bone
from the Add Constraint Menu (Ctrl Alt C)

source/blender/src/editconstraint.c

index 2ee40396061faeb978853086df6590d4bb902d60..b51b05bf10d7eed751671dd4b0cf3b2a84d6ee71 100644 (file)
@@ -659,11 +659,11 @@ void add_constraint(int only_IK)
        else {
                if(pchanact) {
                        if(pchansel)
-                               nr= pupmenu("Add Constraint to Active Bone%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7");
+                               nr= pupmenu("Add Constraint to Active Bone%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7|Action%x16");
                        else if(obsel && obsel->type==OB_CURVE)
-                               nr= pupmenu("Add Constraint to Active Object%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6|Stretch To%x7");
+                               nr= pupmenu("Add Constraint to Active Object%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6|Stretch To%x7|Action%x16");
                        else if(obsel)
-                               nr= pupmenu("Add Constraint to Active Object%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7");
+                               nr= pupmenu("Add Constraint to Active Object%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7|Action%x16");
                        else
                                nr= pupmenu("Add Constraint to New Empty Object%t|Copy Location%x1|Copy Rotation%x2|Copy Scale%x8|Limit Location%x13|Limit Rotation%x14|Limit Scale%x15|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7");
                }
@@ -727,6 +727,7 @@ void add_constraint(int only_IK)
                else if(nr==13) con = add_new_constraint(CONSTRAINT_TYPE_LOCLIMIT);
                else if(nr==14) con = add_new_constraint(CONSTRAINT_TYPE_ROTLIMIT);
                else if(nr==15) con = add_new_constraint(CONSTRAINT_TYPE_SIZELIMIT);
+               else if(nr==16) con = add_new_constraint(CONSTRAINT_TYPE_ACTION);
                
                if(con==NULL) return;   /* paranoia */