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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user