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-09-08 06:09:14 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-08 06:09:14 +0400
commit6808e15c8d20819deddd6b175668d11a6c6f454d (patch)
tree5beae41d3b50753e3e328749f59b7dad8235bfd9 /source/blender/editors/armature/poseobject.c
parent00838f05d23cbd2dfefeab10d9d5345bbad25ea6 (diff)
2.5 - Mode Switching Bugfixes
This commit some of the many bugs here (it's still not perfect now, but much better than it was): * Moving in/out of Object, Edit, and Pose Modes for Armatures should now work smoothly. Operators should work nicely in the appropriate modes now (select linked might be a bit tempermental still, since it uses mouse-position). * Fixed the 'mysterious' memory leaks when changing modes. These were only caused when using the mode switching menu in the 3D-View. * Went through bullet-proofing some of the operator calling functions against NULL operator id-name strings.
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r--source/blender/editors/armature/poseobject.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 2673640b213..a4a518bc003 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -125,9 +125,8 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
switch (ob->type){
case OB_ARMATURE:
-
+ ob->restore_mode = ob->mode;
ob->mode |= OB_MODE_POSE;
- base->flag= ob->flag;
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_POSE, NULL);
@@ -136,7 +135,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
return;
}
- ED_object_toggle_modes(C, ob->mode);
+ //ED_object_toggle_modes(C, ob->mode);
}
void ED_armature_exit_posemode(bContext *C, Base *base)
@@ -144,8 +143,8 @@ void ED_armature_exit_posemode(bContext *C, Base *base)
if(base) {
Object *ob= base->object;
+ ob->restore_mode = ob->mode;
ob->mode &= ~OB_MODE_POSE;
- base->flag= ob->flag;
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
}