diff options
Diffstat (limited to 'editor/editor_resource_picker.cpp')
-rw-r--r-- | editor/editor_resource_picker.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index a2d11c4b1f..f05c401f1d 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -934,7 +934,7 @@ bool EditorShaderPicker::handle_menu_selected(int p_which) { switch (p_which) { case OBJ_MENU_NEW_SHADER: { if (material.is_valid()) { - EditorNode::get_singleton()->get_scene_tree_dock()->open_shader_dialog(material); + EditorNode::get_singleton()->get_scene_tree_dock()->open_shader_dialog(material, preferred_mode); return true; } } break; @@ -952,5 +952,9 @@ ShaderMaterial *EditorShaderPicker::get_edited_material() const { return edited_material; } +void EditorShaderPicker::set_preferred_mode(int p_mode) { + preferred_mode = p_mode; +} + EditorShaderPicker::EditorShaderPicker() { } |