Skip to content

Commit 69613d2

Browse files
committed
SceneCreateDialog: Hide 3D Scene option when 3D editor is disabled
1 parent 8aa37ca commit 69613d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

editor/scene/scene_create_dialog.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "editor/editor_string_names.h"
3636
#include "editor/gui/create_dialog.h"
3737
#include "editor/gui/editor_validation_panel.h"
38+
#include "editor/settings/editor_feature_profile.h"
3839
#include "editor/themes/editor_scale.h"
3940
#include "scene/2d/node_2d.h"
4041
#include "scene/3d/node_3d.h"
@@ -67,6 +68,12 @@ void SceneCreateDialog::config(const String &p_dir) {
6768
scene_name_edit->set_text("");
6869
callable_mp((Control *)scene_name_edit, &Control::grab_focus).call_deferred();
6970
validation_panel->update();
71+
72+
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
73+
node_type_3d->set_visible(profile.is_null() || !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D));
74+
if (!node_type_3d->is_visible() && node_type_3d->is_pressed()) {
75+
node_type_2d->set_pressed(true);
76+
}
7077
}
7178

7279
void SceneCreateDialog::accept_create() {

0 commit comments

Comments
 (0)