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-10-06 15:33:58 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-06 15:33:58 +0400
commit22605ec759a564428b82a3de1053c0152e9d9374 (patch)
tree60626ff89a25a8077cf7e3ed36e0affb7d94b17f /source/blender/editors/armature/poseobject.c
parentc12cb02c56ef575720f468ed1de7dc065f153580 (diff)
Bone Selections: Ability to set bones as unselectable
In the Outliner, it is now possible to toggle per bone the selectability of the bone in the viewport, as for Objects using the restriction columns. This can also be set using the RNA-api. I've tested all commonly used tools IMO, but there may still be a few which I've missed. Please report those cases. PS. For some reason, the define was already there, but not connected up to anything. Can't remember why anymore, but here it is...
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r--source/blender/editors/armature/poseobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index d4b7aa149df..edbc7b9ae9b 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -543,7 +543,7 @@ void pose_select_constraint_target(Scene *scene)
for (ct= targets.first; ct; ct= ct->next) {
if ((ct->tar == ob) && (ct->subtarget[0])) {
bPoseChannel *pchanc= get_pose_channel(ob->pose, ct->subtarget);
- if(pchanc)
+ if((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE))
pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
}
}
@@ -582,7 +582,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *op)
for (ct= targets.first; ct; ct= ct->next) {
if ((ct->tar == ob) && (ct->subtarget[0])) {
bPoseChannel *pchanc= get_pose_channel(ob->pose, ct->subtarget);
- if(pchanc) {
+ if((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE)) {
pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
found= 1;
}
@@ -634,7 +634,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
curbone= pchan->bone;
- if (arm->layer & curbone->layer) {
+ if ((arm->layer & curbone->layer) && (curbone->flag & BONE_UNSELECTABLE)==0) {
if (curbone->flag & (BONE_ACTIVE)) {
if (direction == BONE_SELECT_PARENT) {
@@ -646,7 +646,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
if (!add_to_sel) curbone->flag &= ~BONE_SELECTED;
curbone->flag &= ~BONE_ACTIVE;
pabone->flag |= (BONE_ACTIVE|BONE_SELECTED);
-
+
found= 1;
break;
}
@@ -660,7 +660,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
if (!add_to_sel) curbone->flag &= ~BONE_SELECTED;
curbone->flag &= ~BONE_ACTIVE;
chbone->flag |= (BONE_ACTIVE|BONE_SELECTED);
-
+
found= 1;
break;
}