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:
authorTon Roosendaal <ton@blender.org>2005-12-08 18:05:14 +0300
committerTon Roosendaal <ton@blender.org>2005-12-08 18:05:14 +0300
commit4b7bc941e57e79048da21374574f82eb1e3dd656 (patch)
treefd0d15a5d4658bd6b9a44beab81d2ce969887170 /source/blender/src/editconstraint.c
parent42ec7a2afa2eae246bc400ad02666e02fd525e47 (diff)
Orange: More fixes in bone-layers (#$@%!).
- constraint buttons were drawing the hidden bone settings - ctrl+I or 'Add constraint' didn't respect layers yet
Diffstat (limited to 'source/blender/src/editconstraint.c')
-rw-r--r--source/blender/src/editconstraint.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/src/editconstraint.c b/source/blender/src/editconstraint.c
index dfca6144e62..ffa53cab4ce 100644
--- a/source/blender/src/editconstraint.c
+++ b/source/blender/src/editconstraint.c
@@ -587,18 +587,20 @@ void add_constraint(int only_IK)
/* paranoia checks */
if(ob==NULL || ob==G.obedit) return;
-
+
if(ob->pose && (ob->flag & OB_POSEMODE)) {
-
+ bArmature *arm= ob->data;
+
/* find active channel */
- for(pchanact= ob->pose->chanbase.first; pchanact; pchanact= pchanact->next)
- if(pchanact->bone->flag & BONE_ACTIVE) break;
+ pchanact= get_active_posechannel(ob);
if(pchanact==NULL) return;
/* find selected bone */
for(pchansel= ob->pose->chanbase.first; pchansel; pchansel= pchansel->next) {
if(pchansel!=pchanact)
- if(pchansel->bone->flag & BONE_SELECTED) break;
+ if(pchansel->bone->flag & BONE_SELECTED)
+ if(pchansel->bone->layer & arm->layer)
+ break;
}
}