From ee06cfe6e561283bcbfc2bf72d98252509443aae Mon Sep 17 00:00:00 2001 From: JFonS Date: Sun, 26 Aug 2018 12:25:41 +0200 Subject: Fix "Convert To ShaderMaterial" option not working, closes #20891 --- editor/plugins/material_editor_plugin.cpp | 6 +++--- editor/plugins/material_editor_plugin.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'editor') 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 &p_resource) c Ref mat = p_resource; return mat.is_valid(); } -Ref SpatialMaterialConversionPlugin::convert(const Ref &p_resource) { +Ref SpatialMaterialConversionPlugin::convert(const Ref &p_resource) const { Ref mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref()); @@ -475,7 +475,7 @@ bool ParticlesMaterialConversionPlugin::handles(const Ref &p_resource) Ref mat = p_resource; return mat.is_valid(); } -Ref ParticlesMaterialConversionPlugin::convert(const Ref &p_resource) { +Ref ParticlesMaterialConversionPlugin::convert(const Ref &p_resource) const { Ref mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref()); @@ -513,7 +513,7 @@ bool CanvasItemMaterialConversionPlugin::handles(const Ref &p_resource Ref mat = p_resource; return mat.is_valid(); } -Ref CanvasItemMaterialConversionPlugin::convert(const Ref &p_resource) { +Ref CanvasItemMaterialConversionPlugin::convert(const Ref &p_resource) const { Ref mat = p_resource; ERR_FAIL_COND_V(!mat.is_valid(), Ref()); 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 &p_resource) const; - virtual Ref convert(const Ref &p_resource); + virtual Ref convert(const Ref &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 &p_resource) const; - virtual Ref convert(const Ref &p_resource); + virtual Ref convert(const Ref &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 &p_resource) const; - virtual Ref convert(const Ref &p_resource); + virtual Ref convert(const Ref &p_resource) const; }; #endif // MATERIAL_EDITOR_PLUGIN_H -- cgit v1.2.3