Skip to content

Add warnings in Node3D about losing transformations#116759

Open
Lakamfo wants to merge 5 commits intogodotengine:masterfrom
Lakamfo:master
Open

Add warnings in Node3D about losing transformations#116759
Lakamfo wants to merge 5 commits intogodotengine:masterfrom
Lakamfo:master

Conversation

@Lakamfo
Copy link

@Lakamfo Lakamfo commented Feb 25, 2026

Add warnings in Node3D to warn when a Node3D is parented to a node without a 3D transform (and not the scene root) and has an owner. The warning helps users detect that the node will not inherit a 3D transform.

Example image

Closes: godotengine/godot-proposals#14328

Introduce get_configuration_warnings() in Node3D to warn when a Node3D is parented to a node without a 3D transform (and not the scene root) while having an owner. Adds the method declaration to the header and includes scene/main/window.h in the implementation. The warning helps users detect that the node will not inherit a 3D transform
@Lakamfo Lakamfo requested a review from a team as a code owner February 25, 2026 13:57
@AThousandShips
Copy link
Member

There are some odd changes in this, did you write this code yourself or did you use AI to write it? Please see our AI policy

@Lakamfo
Copy link
Author

Lakamfo commented Feb 25, 2026

There are some odd changes in this, did you write this code yourself or did you use AI to write it? Please see our AI policy

I used AI for reference only. Code was written by me, with some partial copy-paste from path_2d.cpp
The code may look a bit strange because I’m not very familiar with how scenes are structured inside editor 😅
Without checking for the root node, it looked fine

Removed an unused viewport include since it is part of "scene/main/window.h" and adjusted the formatting. Simplified the get_owner() null check to a boolean check and rewrote the configuration warning as a single string containing a '\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when Node3D has non-spatial parent in the scene tree and therefore has its global transform defaulted to 0,0,0

2 participants