A quick way to transfer materials from json to glb model?

Hey everyone

I’m building a configurator type of application, and need to update all my older imported FBX models. All models are created as json assets, but new uploads are created as GLB (Yay!). My only issue is, that the previous models all have new materials assigned (couple hundred sub meshes per model), and the newly imported glb versions all have the base materials from the original fbx.

Is there a quick way to have the new models’ sub meshes reference the same materials as the old models?

@Leonidas did you have some command in the console that could do this?

That’s definitely doable, I don’t have a method that does that exactly, but here is a close one. That demonstrates searching through assets and manipulating references.

@eilsoe that’s an unofficial API so make sure to backup your project first! I think you can definitely build a method that does exactly what you are asking for. If you have any issue ask again.

1 Like