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>2007-10-04 13:20:01 +0400
committerJoshua Leung <aligorith@gmail.com>2007-10-04 13:20:01 +0400
commit476ebfc5d088daff6b9ad4eb767e355b1751745c (patch)
tree1ff563d43ea6a9beaa3b11244e0374932a94a134 /source/blender/src/poseobject.c
parent4e7128f5fdd8c148f3c3558eb4c5433ffa70c056 (diff)
Bugfix for Move Bone to Layer:
The case for EditMode needed to occur before the one for PoseMode as PoseMode can still be 'on' for an armature even while it is in EditMode.
Diffstat (limited to 'source/blender/src/poseobject.c')
-rw-r--r--source/blender/src/poseobject.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c
index be5b7caf00c..5e78abd8b41 100644
--- a/source/blender/src/poseobject.c
+++ b/source/blender/src/poseobject.c
@@ -881,7 +881,7 @@ void pose_movetolayer(void)
bArmature *arm;
short lay= 0;
- if(ob==NULL) return;
+ if (ob==NULL) return;
arm= ob->data;
if (G.qual & LR_SHIFTKEY) {
@@ -897,6 +897,32 @@ void pose_movetolayer(void)
allqueue(REDRAWACTION, 0);
allqueue(REDRAWBUTSEDIT, 0);
}
+ else if (G.obedit) {
+ /* the check for editbone layer moving needs to occur before posemode one to work */
+ EditBone *ebo;
+
+ for (ebo= G.edbo.first; ebo; ebo= ebo->next) {
+ if (arm->layer & ebo->layer) {
+ if (ebo->flag & BONE_SELECTED)
+ lay |= ebo->layer;
+ }
+ }
+ if (lay==0) return;
+
+ if ( movetolayer_short_buts(&lay, "Bone Layers")==0 ) return;
+ if (lay==0) return;
+
+ for (ebo= G.edbo.first; ebo; ebo= ebo->next) {
+ if (arm->layer & ebo->layer) {
+ if (ebo->flag & BONE_SELECTED)
+ ebo->layer= lay;
+ }
+ }
+
+ BIF_undo_push("Move Bone Layer");
+ allqueue(REDRAWVIEW3D, 0);
+ allqueue(REDRAWBUTSEDIT, 0);
+ }
else if (ob->flag & OB_POSEMODE) {
/* pose-channel layers */
bPoseChannel *pchan;
@@ -922,35 +948,9 @@ void pose_movetolayer(void)
}
}
- BIF_undo_push("Move Bone layer");
+ BIF_undo_push("Move Bone Layer");
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWACTION, 0);
allqueue(REDRAWBUTSEDIT, 0);
}
- else if (G.obedit) {
- /* must be editbone layers then */
- EditBone *ebo;
-
- for (ebo= G.edbo.first; ebo; ebo= ebo->next) {
- if (arm->layer & ebo->layer) {
- if (ebo->flag & BONE_SELECTED)
- lay |= ebo->layer;
- }
- }
- if (lay==0) return;
-
- if ( movetolayer_short_buts(&lay, "Bone Layers")==0 ) return;
- if (lay==0) return;
-
- for (ebo= G.edbo.first; ebo; ebo= ebo->next) {
- if (arm->layer & ebo->layer) {
- if (ebo->flag & BONE_SELECTED)
- ebo->layer= lay;
- }
- }
-
- BIF_undo_push("Move Bone layer");
- allqueue(REDRAWVIEW3D, 0);
- allqueue(REDRAWBUTSEDIT, 0);
- }
}