summaryrefslogtreecommitdiffstats
path: root/editor/plugins/material_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-09-15 01:01:52 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 12:01:24 +0100
commitdd3682e5feb433117fbf62c363c7ba6ff214f8fa (patch)
treeebe83f2fb472140c4ae267fd5f4a7db7525acbc1 /editor/plugins/material_editor_plugin.cpp
parent6deffa62fbd1e91873afa663630b788b9ffabee3 (diff)
downloadredot-engine-dd3682e5feb433117fbf62c363c7ba6ff214f8fa.tar.gz
Modernized default 3D material, fixes material bugs.
Diffstat (limited to 'editor/plugins/material_editor_plugin.cpp')
-rw-r--r--editor/plugins/material_editor_plugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index c4e6d37e7f..4e44082853 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -237,18 +237,18 @@ MaterialEditorPlugin::MaterialEditorPlugin(EditorNode *p_node) {
add_inspector_plugin(plugin);
}
-String SpatialMaterialConversionPlugin::converts_to() const {
+String StandardMaterial3DConversionPlugin::converts_to() const {
return "ShaderMaterial";
}
-bool SpatialMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+bool StandardMaterial3DConversionPlugin::handles(const Ref<Resource> &p_resource) const {
- Ref<SpatialMaterial> mat = p_resource;
+ Ref<StandardMaterial3D> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> SpatialMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p_resource) const {
- Ref<SpatialMaterial> mat = p_resource;
+ Ref<StandardMaterial3D> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
Ref<ShaderMaterial> smat;
@@ -268,7 +268,7 @@ Ref<Resource> SpatialMaterialConversionPlugin::convert(const Ref<Resource> &p_re
for (List<PropertyInfo>::Element *E = params.front(); E; E = E->next()) {
- // Texture parameter has to be treated specially since SpatialMaterial saved it
+ // Texture parameter has to be treated specially since StandardMaterial3D saved it
// as RID but ShaderMaterial needs Texture itself
Ref<Texture2D> texture = mat->get_texture_by_name(E->get().name);
if (texture.is_valid()) {