Don't create bones from empty scene
This commit is contained in:
parent
a67d37f7cf
commit
e5b6b3e1e3
1 changed files with 5 additions and 1 deletions
|
@ -4587,7 +4587,11 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
} break;
|
||||
case SKELETON_MAKE_BONES: {
|
||||
HashMap<Node *, Object *> &selection = editor_selection->get_selection();
|
||||
Node *editor_root = EditorNode::get_singleton()->get_edited_scene()->get_tree()->get_edited_scene_root();
|
||||
Node *editor_root = get_tree()->get_edited_scene_root();
|
||||
|
||||
if (!editor_root || selection.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
undo_redo->create_action(TTR("Create Custom Bone2D(s) from Node(s)"));
|
||||
for (const KeyValue<Node *, Object *> &E : selection) {
|
||||
|
|
Loading…
Reference in a new issue