Skip to content

When drag'n'drop, automatically create root node if you haven't one yet and place there object you currently drag.

Rafał Mikrut requested to merge github/fork/Krakean/change_addrootifnone into master

Created by: Krakean

Currently, if you haven't anything in scene tree dock, when trying to drag'n'drop a picture (for example, in 2D) to viewport - you will get "No parent to instance a child at". Can be kinda confusing for newbies. This PR fixes it (as requested in issue #12325 (closed) which this PR partially(or completely) fixes, and may be a number of issues listed there as related to #12325 (closed)). Now, when you drag'n'drop, it will automatically create root node and place item there.

This is how it looks in action: https://i.imgur.com/R8hZaSe.gifv

P.S. There is still number of places where we can get "No parent to instance a child at", but I don't know how to get there yet via editor :) But this one particular sample case - which you as newbie can get immediatelly after opening Godot & trying drag'n'drop something - is fixed. If community will like this change, I can dig into other such places where we getting "No parent to..." and "fix" them too.

Merge request reports