summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorJFonS <joan.fonssanchez@gmail.com>2018-08-26 12:25:41 +0200
committerJFonS <joan.fonssanchez@gmail.com>2018-08-26 12:25:41 +0200
commitee06cfe6e561283bcbfc2bf72d98252509443aae (patch)
tree44025127eded7746843950c9209c6e4399ae70e4 /editor/plugins
parentcef310e0ea0f8e7f3621e9ba29a567f09fb51beb (diff)
Fix "Convert To ShaderMaterial" option not working, closes #20891
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/material_editor_plugin.cpp6
-rw-r--r--editor/plugins/material_editor_plugin.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 27a16fd3dd..f282d391ff 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -429,7 +429,7 @@ bool SpatialMaterialConversionPlugin::handles(const Ref<Resource> &p_resource) c
Ref<SpatialMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> SpatialMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) {
+Ref<Resource> SpatialMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<SpatialMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -475,7 +475,7 @@ bool ParticlesMaterialConversionPlugin::handles(const Ref<Resource> &p_resource)
Ref<ParticlesMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) {
+Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<ParticlesMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
@@ -513,7 +513,7 @@ bool CanvasItemMaterialConversionPlugin::handles(const Ref<Resource> &p_resource
Ref<CanvasItemMaterial> mat = p_resource;
return mat.is_valid();
}
-Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) {
+Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<CanvasItemMaterial> mat = p_resource;
ERR_FAIL_COND_V(!mat.is_valid(), Ref<Resource>());
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 80a5c535b8..31a927d83f 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -109,7 +109,7 @@ class SpatialMaterialConversionPlugin : public EditorResourceConversionPlugin {
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
- virtual Ref<Resource> convert(const Ref<Resource> &p_resource);
+ virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const;
};
class ParticlesMaterialConversionPlugin : public EditorResourceConversionPlugin {
@@ -117,7 +117,7 @@ class ParticlesMaterialConversionPlugin : public EditorResourceConversionPlugin
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
- virtual Ref<Resource> convert(const Ref<Resource> &p_resource);
+ virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const;
};
class CanvasItemMaterialConversionPlugin : public EditorResourceConversionPlugin {
@@ -125,7 +125,7 @@ class CanvasItemMaterialConversionPlugin : public EditorResourceConversionPlugin
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
- virtual Ref<Resource> convert(const Ref<Resource> &p_resource);
+ virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const;
};
#endif // MATERIAL_EDITOR_PLUGIN_H