Changing to ShaderMaterial via gdscript

Godot Version

4.2 Stable

Question

There is a drop down option in the inspector panel next to the material to convert StandardMaterial3D to ShaderMaterial is this possible via gdscript?

Trying to find the answer too.
Found that the conversion is down by using plugins named XXXConversionPlugin inherited from EditorResourceConversionPlugin (read in material_editor_plugin.h/.cpp)
I’m not sure whether there is a way to call it from GDScript.
Here is the official doc of the class below.
EditorResourceConversionPlugin — Godot Engine (stable) documentation in English

1 Like