diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-19 11:20:21 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-19 11:20:21 +0400 |
commit | 8ced84eec9ae9fd311789935901f52d5073eb0fb (patch) | |
tree | c076738d35ffe660f4f5965f2504d7699896940d /source/blender/editors/armature | |
parent | 388af9d827ccae97f24c6d65f7ab2da22ee8ea79 (diff) |
2.5 - Clear Constraints Operators
Added some operators to clear all constraints on the active object or the selected bones.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/poseobject.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index f7d926ea18d..ccf82fbc7ac 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -640,38 +640,6 @@ void pose_clear_IK(Scene *scene) BIF_undo_push("Remove IK constraint(s)"); } -void pose_clear_constraints(Scene *scene) -{ - Object *obedit= scene->obedit; // XXX context - Object *ob= OBACT; - bArmature *arm= ob->data; - bPoseChannel *pchan; - - /* paranoia checks */ - if(!ob && !ob->pose) return; - if(ob==obedit || (ob->flag & OB_POSEMODE)==0) return; - - if(pose_has_protected_selected(ob, 0, 1)) - return; - - if(okee("Remove Constraints")==0) return; - - /* find active */ - for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - if(arm->layer & pchan->bone->layer) { - if(pchan->bone->flag & (BONE_ACTIVE|BONE_SELECTED)) { - free_constraints(&pchan->constraints); - pchan->constflag= 0; - } - } - } - - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); // and all its relations - - BIF_undo_push("Remove Constraint(s)"); - -} - void pose_copy_menu(Scene *scene) { |