First version of visualizing the DoF (french degrees!) for Pose-bones. It

now only draws the limits for X and Z rotations (Y is bone axis itself).

Quick snaphsots (links will disappear):
http://www.blender.org/bf/rt6.jpg
http://www.blender.org/bf/rt7.jpg

It only draws for selected Bones that are part of IK, and have limits set.
Most work was getting code OK to setup drawing this 'DoF space', so now
experiments can be done with more drawing types.

ALso; Buttons for DoFs now only draw if the pose-bones are part of an IK
chain.
This commit is contained in:
2005-08-29 17:02:24 +00:00
parent a07394ef2c
commit fa63c6a7e1
4 changed files with 201 additions and 40 deletions

View File

@@ -162,7 +162,21 @@ bPoseChannel *get_active_posechannel (Object *ob)
return NULL;
}
int pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan)
{
bConstraint *con;
Bone *bone;
for(con= pchan->constraints.first; con; con= con->next) {
if(con->type==CONSTRAINT_TYPE_KINEMATIC) return 1;
}
for(bone= pchan->bone->childbase.first; bone; bone= bone->next) {
pchan= get_pose_channel(ob->pose, bone->name);
if(pchan && pose_channel_in_IK_chain(ob, pchan))
return 1;
}
return 0;
}
void pose_select_constraint_target(void)
{