Orange: More fixes in bone-layers (#$@%!).

- constraint buttons were drawing the hidden bone settings
- ctrl+I or 'Add constraint' didn't respect layers yet
This commit is contained in:
2005-12-08 15:05:14 +00:00
parent 42ec7a2afa
commit 4b7bc941e5
2 changed files with 9 additions and 6 deletions

View File

@@ -158,11 +158,12 @@ void exit_posemode(void)
/* called by buttons to find a bone to display/edit values for */
bPoseChannel *get_active_posechannel (Object *ob)
{
bArmature *arm= ob->data;
bPoseChannel *pchan;
/* find active */
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
if(pchan->bone && (pchan->bone->flag & BONE_ACTIVE))
if(pchan->bone && (pchan->bone->flag & BONE_ACTIVE) && (pchan->bone->layer & arm->layer))
return pchan;
}