-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Camera2D
is enabled when dragging scene files to the CanvasItemEditor
#87743
Conversation
This bug potentially affects all nodes that rely on |
Yes, but the main issue is that the dragged scenes is instantiated and is added to the editor's root while dragging, this behavior will result in more issues like running the tool scripts while dragging, especially if it's a heavy scene.
I have tried to stop the dragged scene from proccessing, but it didn't work as expected, maybe we can add an internal preview node to the edited scene and we prevent it from being saved instead of adding it to the editor's root. |
Which is why I suggested that the change can be done in |
Is it fine to add this bool Node::is_part_of_edited_scene() const {
return Engine::get_singleton()->is_editor_hint() && is_inside_tree() && get_tree()->get_edited_scene_root() &&
(get_tree()->get_edited_scene_root() == this || get_tree()->get_edited_scene_root()->get_viewport() == get_viewport() || get_tree()->get_edited_scene_root()->is_ancestor_of(this));
} |
It reminded me of this old issue: #39221 The best condition would be: I'd suggest this for now: bool Node::is_part_of_edited_scene() const {
return Engine::get_singleton()->is_editor_hint() && is_inside_tree() && get_tree()->get_edited_scene_root() &&
get_tree()->get_edited_scene_root()->get_parent()->is_ancestor_of(this);
} |
ab61965
to
2656fbc
Compare
2656fbc
to
451b198
Compare
Thanks! |
Fixes: #87704