Fix #159084: Armature join operator leaves armature in edit mode

The issue was in the `ED_armature_join_objects_exec` function.
This iterates over all selected armatures and brings them to
edit mode with `ED_armature_to_edit`.
However it never moved them out of edit mode which is
why they were left in a broken state.

This also fixes a crash when you try to enter pose mode
with that invalid armature.

Pull Request: https://projects.blender.org/blender/blender/pulls/159952
This commit is contained in:
Christoph Lendenfeld 2026-06-11 14:07:05 +02:00 • committed by Christoph Lendenfeld
parent b1a42b278d
commit 94b878e221

View file

@ -529,6 +529,10 @@ wmOperatorStatus ED_armature_join_objects_exec(bContext *C, wmOperator *op)
}
}
/* Bring armature out of edit mode. See #159084. */
ED_armature_from_edit(bmain, curarm);
ED_armature_edit_free(curarm);
/* Free the old object data */
ed::object::base_free_and_unlink(bmain, scene, ob_iter);
}