forked from bartvdbraak/blender
fix for active bone not saving in editmode.
This commit is contained in:
parent
bd5da19d86
commit
f801f8057d
@ -501,6 +501,7 @@ void ED_armature_from_edit(Object *obedit)
|
||||
|
||||
/* armature bones */
|
||||
BKE_armature_bonelist_free(&arm->bonebase);
|
||||
arm->act_bone = NULL;
|
||||
|
||||
/* remove zero sized bones, this gives unstable restposes */
|
||||
for (eBone = arm->edbo->first; eBone; eBone = neBone) {
|
||||
@ -634,7 +635,6 @@ void ED_armature_to_edit(Object *ob)
|
||||
ED_armature_edit_free(ob);
|
||||
arm->edbo = MEM_callocN(sizeof(ListBase), "edbo armature");
|
||||
arm->act_edbone = make_boneList(arm->edbo, &arm->bonebase, NULL, arm->act_bone);
|
||||
arm->act_bone = NULL;
|
||||
|
||||
// BIF_freeTemplates(); /* force template update when entering editmode */
|
||||
}
|
||||
|
@ -390,11 +390,15 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
|
||||
|
||||
layer_used = arm->layer_used;
|
||||
|
||||
if (arm->edbo && arm->act_edbone) {
|
||||
layer_active |= arm->act_edbone->layer;
|
||||
if (arm->edbo) {
|
||||
if (arm->act_edbone) {
|
||||
layer_active |= arm->act_edbone->layer;
|
||||
}
|
||||
}
|
||||
else if (arm->act_bone) {
|
||||
layer_active |= arm->act_bone->layer;
|
||||
else {
|
||||
if (arm->act_bone) {
|
||||
layer_active |= arm->act_bone->layer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ typedef struct bArmature {
|
||||
* - from the user perspective active == last selected
|
||||
* - active should be ignored when not visible (hidden layer) */
|
||||
|
||||
Bone *act_bone; /* active bone (when not in editmode) */
|
||||
Bone *act_bone; /* active bone */
|
||||
struct EditBone *act_edbone; /* active editbone (in editmode) */
|
||||
|
||||
void *sketch; /* sketch struct for etch-a-ton */
|
||||
|
Loading…
Reference in New Issue
Block a user