diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-26 23:47:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 23:47:39 +0200 |
commit | 9d28e1027636ebf1750a65105f6a23a17210813d (patch) | |
tree | 709e1903b9d3620ab717991c90d2132237d29eef /editor | |
parent | 155c6e909a7a5396d05a2a2c71b85658841f5ad0 (diff) | |
parent | a1899111bee4c38a40f3857b9cf7af71a505301d (diff) |
Merge pull request #61443 from KoBeWi/primitive_fix
Use Spatial shader as default for PrimitiveMesh
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 880e51660b..196fba6e9b 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -42,6 +42,7 @@ #include "scene/3d/gpu_particles_3d.h" #include "scene/main/window.h" #include "scene/resources/font.h" +#include "scene/resources/mesh.h" ///////////////////// Nil ///////////////////////// @@ -3172,7 +3173,7 @@ void EditorPropertyResource::_update_preferred_shader() { shader_picker->set_preferred_mode(Shader::MODE_FOG); } else if (Object::cast_to<CanvasItem>(object)) { shader_picker->set_preferred_mode(Shader::MODE_CANVAS_ITEM); - } else if (Object::cast_to<Node3D>(object)) { + } else if (Object::cast_to<Node3D>(object) || Object::cast_to<Mesh>(object)) { shader_picker->set_preferred_mode(Shader::MODE_SPATIAL); } else if (Object::cast_to<Sky>(object)) { shader_picker->set_preferred_mode(Shader::MODE_SKY); |