diff options
author | Matt Ebb <matt@mke3.net> | 2005-12-18 21:05:14 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2005-12-18 21:05:14 +0300 |
commit | c33831ac1632ac0a0e42e174035dd0d0ea15a087 (patch) | |
tree | cb53bba3d773d49360d9e45f219d333010373b75 /source/blender/src/editconstraint.c | |
parent | 6f422a749ae8689d95cb8587f828553ef8811223 (diff) |
* Updates for missing menu items
Diffstat (limited to 'source/blender/src/editconstraint.c')
-rw-r--r-- | source/blender/src/editconstraint.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/source/blender/src/editconstraint.c b/source/blender/src/editconstraint.c index dfca6144e62..1705ad14acc 100644 --- a/source/blender/src/editconstraint.c +++ b/source/blender/src/editconstraint.c @@ -618,28 +618,28 @@ void add_constraint(int only_IK) } if(pchansel) - nr= pupmenu("Add IK Constraint%t|To Selected Bone%x10"); + nr= pupmenu("Add IK Constraint%t|To Active Bone%x10"); else if(obsel) - nr= pupmenu("Add IK Constraint%t|To Selected Object%x10"); + nr= pupmenu("Add IK Constraint%t|To Active Object%x10"); else nr= pupmenu("Add IK Constraint%t|To New Empty Object%x10|Without Target%x11"); } else { if(pchanact) { if(pchansel) - nr= pupmenu("Add Constraint to selected Bone%t|Copy Location%x1|Copy Rotation%x2|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|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7"); else if(obsel && obsel->type==OB_CURVE) - nr= pupmenu("Add Constraint to selected Object%t|Copy Location%x1|Copy Rotation%x2|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|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6|Stretch To%x7"); else if(obsel) - nr= pupmenu("Add Constraint to selected Object%t|Copy Location%x1|Copy Rotation%x2|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|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7"); else nr= pupmenu("Add Constraint to New Empty Object%t|Copy Location%x1|Copy Rotation%x2|Track To%x3|Floor%x4|Locked Track%x5|Stretch To%x7"); } else { if(obsel && obsel->type==OB_CURVE) - nr= pupmenu("Add Constraint to selected Object%t|Copy Location%x1|Copy Rotation%x2|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6"); + nr= pupmenu("Add Constraint to Active Object%t|Copy Location%x1|Copy Rotation%x2|Track To%x3|Floor%x4|Locked Track%x5|Follow Path%x6"); else if(obsel) - nr= pupmenu("Add Constraint to selected Object%t|Copy Location%x1|Copy Rotation%x2|Track To%x3|Floor%x4|Locked Track%x5"); + nr= pupmenu("Add Constraint to Active Object%t|Copy Location%x1|Copy Rotation%x2|Track To%x3|Floor%x4|Locked Track%x5"); else nr= pupmenu("Add Constraint to New Empty Object%t|Copy Location%x1|Copy Rotation%x2|Track To%x3|Floor%x4|Locked Track%x5"); } @@ -758,4 +758,24 @@ void add_constraint(int only_IK) } - +void ob_clear_constraints(void) +{ + Object *ob= OBACT; + + /* paranoia checks */ + if(!ob) return; + if(ob==G.obedit || (ob->flag & OB_POSEMODE)) return; + + if(okee("Clear Constraints")==0) return; + + free_constraints(&ob->constraints); + + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + + allqueue (REDRAWVIEW3D, 0); + allqueue (REDRAWBUTSOBJECT, 0); + allqueue (REDRAWOOPS, 0); + + BIF_undo_push("Clear Constraint(s)"); + +}
\ No newline at end of file |