diff options
Diffstat (limited to 'editor/scene_tree_editor.cpp')
-rw-r--r-- | editor/scene_tree_editor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index a290e57a4e..831b7b6775 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -92,7 +92,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i } else if (p_id == BUTTON_LOCK) { undo_redo->create_action(TTR("Unlock Node")); - if (n->is_class("CanvasItem") || n->is_class("Spatial")) { + if (n->is_class("CanvasItem") || n->is_class("Node3D")) { undo_redo->add_do_method(n, "remove_meta", "_edit_lock_"); undo_redo->add_undo_method(n, "set_meta", "_edit_lock_", true); @@ -112,7 +112,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i } else if (p_id == BUTTON_GROUP) { undo_redo->create_action(TTR("Button Group")); - if (n->is_class("CanvasItem") || n->is_class("Spatial")) { + if (n->is_class("CanvasItem") || n->is_class("Node3D")) { undo_redo->add_do_method(n, "remove_meta", "_edit_group_"); undo_redo->add_undo_method(n, "set_meta", "_edit_group_", true); @@ -354,7 +354,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node)); _update_visibility_color(p_node, item); - } else if (p_node->is_class("Spatial")) { + } else if (p_node->is_class("Node3D")) { bool is_locked = p_node->has_meta("_edit_lock_"); if (is_locked) @@ -457,7 +457,7 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) { if (p_node->is_class("CanvasItem")) { visible = p_node->call("is_visible"); CanvasItemEditor::get_singleton()->get_viewport_control()->update(); - } else if (p_node->is_class("Spatial")) { + } else if (p_node->is_class("Node3D")) { visible = p_node->call("is_visible"); } @@ -470,7 +470,7 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) { } void SceneTreeEditor::_update_visibility_color(Node *p_node, TreeItem *p_item) { - if (p_node->is_class("CanvasItem") || p_node->is_class("Spatial")) { + if (p_node->is_class("CanvasItem") || p_node->is_class("Node3D")) { Color color(1, 1, 1, 1); bool visible_on_screen = p_node->call("is_visible_in_tree"); if (!visible_on_screen) { @@ -498,7 +498,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) { if (p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) p_node->disconnect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed)); - if (p_node->is_class("Spatial") || p_node->is_class("CanvasItem")) { + if (p_node->is_class("Node3D") || p_node->is_class("CanvasItem")) { if (p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) p_node->disconnect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed)); } |