summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/scene_tree_dock.cpp7
-rw-r--r--editor/scene_tree_dock.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 71e93750f0..5c08482aa4 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1038,7 +1038,6 @@ void SceneTreeDock::_node_collapsed(Object *p_obj) {
void SceneTreeDock::_notification(int p_what) {
switch (p_what) {
-
case NOTIFICATION_READY: {
if (!first_enter)
@@ -1099,8 +1098,7 @@ void SceneTreeDock::_notification(int p_what) {
button_2d->set_text(TTR("2D Scene"));
button_2d->set_icon(get_icon("Node2D", "EditorIcons"));
button_2d->connect("pressed", this, "_tool_selected", make_binds(TOOL_CREATE_2D_SCENE, false));
-
- Button *button_3d = memnew(Button);
+ button_3d = memnew(Button);
beginner_node_shortcuts->add_child(button_3d);
button_3d->set_text(TTR("3D Scene"));
button_3d->set_icon(get_icon("Spatial", "EditorIcons"));
@@ -2752,12 +2750,15 @@ void SceneTreeDock::_feature_profile_changed() {
profile_allow_editing = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCENE_TREE);
profile_allow_script_editing = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT);
+ bool profile_allow_3d = !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D);
+ button_3d->set_visible(profile_allow_3d);
button_add->set_visible(profile_allow_editing);
button_instance->set_visible(profile_allow_editing);
scene_tree->set_can_rename(profile_allow_editing);
} else {
+ button_3d->set_visible(true);
button_add->set_visible(true);
button_instance->set_visible(true);
scene_tree->set_can_rename(true);
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 4e78b84c53..56fbb86824 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -112,6 +112,8 @@ class SceneTreeDock : public VBoxContainer {
ToolButton *button_create_script;
ToolButton *button_clear_script;
+ Button *button_3d;
+
HBoxContainer *button_hb;
ToolButton *edit_local, *edit_remote;
SceneTreeEditor *scene_tree;