diff options
author | Ton Roosendaal <ton@blender.org> | 2005-12-19 21:56:08 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-12-19 21:56:08 +0300 |
commit | 72d805f17d5e7732cf37c70c1ae732efd5d509c2 (patch) | |
tree | 69640121e30ca61b5c120a146c8f397a17839ae8 /source/blender/src/editconstraint.c | |
parent | 75a227e62009d8fb29f5bd7984ce82dcc4e68797 (diff) | |
parent | c1a2851c0d791f3e041ec6d33747cd056919b6ad (diff) |
Orange: monday merger with bf-blender (loadsa bugfixes).
ALso: a bit tidying up in editaction.c and python Object.c
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 777c88dbbf3..dad204fee6c 100644 --- a/source/blender/src/editconstraint.c +++ b/source/blender/src/editconstraint.c @@ -620,28 +620,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"); } @@ -763,4 +763,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 |