Skip to content

Commit

Permalink
Merge pull request #86668 from KoBeWi/most_shader_path
Browse files Browse the repository at this point in the history
Automatically add path to built-in shaders
  • Loading branch information
akien-mga committed Apr 26, 2024
2 parents 0fe0f1e + 08b9046 commit e7fa697
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 e7fa697

Please sign in to comment.