I’m trying to deal with textures and I’m finding it’s a bit difficult.
You can’t list textures that are being used by a material, you need to know beforehand what slots should be occupied.
-
There’s GetTexture, SetTexture, but the internal dictionary isn’t exposed at all. I’d like to fetch all textures on a given material and change their paths. In another scenario I’m trying to embed them all. And another scenario where i want to convert embedded textures into a relative file path (un-embed them). In that case I’ve found I have to create a whole new material and texture instance to replace the existing ones, as they kept track of the old texture path and wouldnt work with my new relative path.
-
Will SetTexture override the existing texture occupying that slot?
-
What is the best approach for getting SlotNames that are supported? Are some slots supported in the more common formats? I mostly use fbx and gltf. I’ve had to look into fbx ascii output and see what slotnames are being used.