Skip to content

Commit 4ee8674

Browse files
committed
Change root node transform warning to only show up for position
1 parent fc827bb commit 4ee8674

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎editor/gui/scene_tree_editor.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ PackedStringArray SceneTreeEditor::_get_node_configuration_warnings(Node *p_node
6363
if (node_2d) {
6464
// Note: Warn for Node2D but not all CanvasItems, don't warn for Control nodes.
6565
// Control nodes may have reasons to use a transformed root node like anchors.
66-
if (!node_2d->get_transform().is_equal_approx(Transform2D())) {
66+
if (!node_2d->get_position().is_equal_approx(Vector2())) {
6767
warnings.append(TTR("The root node of a scene is recommended to not be transformed, since instances of the scene will usually override this. Reset the transform and reload the scene to remove this warning."));
6868
}
6969
}
7070
Node3D *node_3d = Object::cast_to<Node3D>(p_node);
7171
if (node_3d) {
72-
if (!node_3d->get_transform().is_equal_approx(Transform3D())) {
72+
if (!node_3d->get_position().is_equal_approx(Vector3())) {
7373
warnings.append(TTR("The root node of a scene is recommended to not be transformed, since instances of the scene will usually override this. Reset the transform and reload the scene to remove this warning."));
7474
}
7575
}

0 commit comments

Comments
 (0)