Currently i'm editing my first major script project i've undertaken and while adding new features i've come across a bit that's stumped me.
what i want to do is perform an operation on a standard material or a vray material (copy a map) to a seperate material entirely. but i want it to detect which of the 2 types it is so i can use the correct term ie diffusemap or texmap_diffuse
so for example i have a material defined in the script to create called
so i've got
abc = meditmaterials
if getnumsubmtls meditmaterials == 0 do
test.diffusemap = copy abc.texmap_diffuse
now this works fine for a vray material but if the material in question is a standard material the texmap_diffuse would need to be diffusemap
how can i identify before hand whether the slot is standard material or vray material and then use the correct term?
i feel this is something very simple and i've just got a mindblock but any help is appreciated
thank you for your help guys