Skip to content

Commit

Permalink
Automatically add path to built-in shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Dec 31, 2023
1 parent 13a0d6e commit 08b9046
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion editor/shader_create_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ void fog() {

emit_signal(SNAME("shader_include_created"), shader_inc);
} else {
if (!is_built_in) {
if (is_built_in) {
Node *edited_scene = get_tree()->get_edited_scene_root();
if (likely(edited_scene)) {
shader->set_path(edited_scene->get_scene_file_path() + "::");
}
} else {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
shader->set_path(lpath);

Expand Down

0 comments on commit 08b9046

Please sign in to comment.