Ported "[3.x] Fix wrong owner for editor plugin created nodes in instanced scene" for the skeleton editor aswell.

This commit is contained in:
Relintai 2022-11-30 14:33:08 +01:00
parent 7ee4ed4647
commit 311b5d446b

View File

@ -426,7 +426,7 @@ void SkeletonEditor::pose_to_rest(const bool p_all_bones) {
void SkeletonEditor::create_physical_skeleton() {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
ERR_FAIL_COND(!get_tree());
Node *owner = skeleton == get_tree()->get_edited_scene_root() ? skeleton : skeleton->get_owner();
Node *owner = get_tree()->get_edited_scene_root();
const int bc = skeleton->get_bone_count();