I've written a shader that applies a vertex animation to the body of a plant. I'm trying to figure out the best way to apply it to the scene I'm importing.
My scene is in .glb format and when it imports, all my plant meshes are using the same Spatial material. I'd like to replace this spatial material with my custom shader. I'm not sure how best to do this. I could open up the imported scene in the editor, click on each MeshInstance and set their material override property manually, but this would take a long time. I thought there might be a way to do this by manipulating the imported material that Godot saves as a separate resource in your file system, but there appears to by no way to set an override there.
Is there a way to replace all of a material in an imported scene? Or am I going to need to write a script to visit every node and update it's material?