Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-02-05 06:28:07 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-05 06:28:07 +0300
commitf89e3d251711f3617c982cae35f33d4c6115e72b (patch)
tree83b0399aba32a346ae448960f5153e26b2ebdabd /source/blender/editors/armature/poseobject.c
parent61a6e1957a4a1555564f1eb8dbdb9707fb276826 (diff)
2.5 - Context API access for Bones (EditMode and PoseMode)
* Added selected, selected+editable, and active to access EditBones for Armature Operators to use. These take into account X-Axis Mirror too, so there is really no need to check that sort of thing anymore in tools. * Added a quick testing operator for verifying that these loops filter the data correctly. I've dumped this in armature_ops.c for now. It can be activated using the TKEY hotkey in Armature EditMode only. This should be removed once we have a few more functional tools. * Ported over cleaned up roll-calculation tools from AnimSys2 * Removed a few ugly stubs from posemode code
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r--source/blender/editors/armature/poseobject.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index bb883c5a98d..0771806a4a2 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -91,11 +91,10 @@ static void error() {};
static void BIF_undo_push() {}
static void countall() {}
static void add_constraint() {}
-static void select_actionchannel_by_name() {}
static void autokeyframe_pose_cb_func() {}
/* ************* XXX *************** */
-
+/* This function is used to indicate that a bone is selected and needs keyframes inserted */
void set_pose_keys (Object *ob)
{
bArmature *arm= ob->data;
@@ -104,16 +103,15 @@ void set_pose_keys (Object *ob)
if (ob->pose){
for (chan=ob->pose->chanbase.first; chan; chan=chan->next){
Bone *bone= chan->bone;
- if(bone && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer)) {
- chan->flag |= POSE_KEY;
- }
- else {
+ if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer))
+ chan->flag |= POSE_KEY;
+ else
chan->flag &= ~POSE_KEY;
- }
}
}
}
+/* This function is used to process the necessary updates for */
void ED_armature_enter_posemode(bContext *C, Base *base)
{
Object *ob= base->object;
@@ -472,9 +470,7 @@ void pose_select_hierarchy(Scene *scene, short direction, short add_to_sel)
curbone->flag &= ~BONE_ACTIVE;
pabone->flag |= (BONE_ACTIVE|BONE_SELECTED);
- // XXX this is evil... this sort of stuff is to be handled in one go as a result of a notifier
- select_actionchannel_by_name (ob->action, pchan->name, 0);
- select_actionchannel_by_name (ob->action, pchan->parent->name, 1);
+ // XXX notifiers need to be sent to other editors to update
break;
}
} else { // BONE_SELECT_CHILD
@@ -488,9 +484,7 @@ void pose_select_hierarchy(Scene *scene, short direction, short add_to_sel)
curbone->flag &= ~BONE_ACTIVE;
chbone->flag |= (BONE_ACTIVE|BONE_SELECTED);
- // XXX this is evil... this sort of stuff is to be handled in one go as a result of a notifier
- select_actionchannel_by_name (ob->action, pchan->name, 0);
- select_actionchannel_by_name (ob->action, pchan->child->name, 1);
+ // XXX notifiers need to be sent to other editors to update
break;
}
}
@@ -1339,8 +1333,7 @@ void pose_activate_flipped_bone(Scene *scene)
DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}
- // XXX this is evil... this sort of stuff is to be handled in one go as a result of a notifier
- select_actionchannel_by_name(ob->action, name, 1);
+ // XXX notifiers need to be sent to other editors to update
}
}