Fix "Convert To ShaderMaterial" option not working, closes #20891
This commit is contained in:
parent
cef310e0ea
commit
ee06cfe6e5
|
@ -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>());
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue