Format a material to a MS script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have got a script to write(format) a file from the material in the active slot.
This way I have material definitions which I can execute from other scripts
All good but my issue is I cant work out where to start to do it as a loop so I pick up all parametres. I can do it one by one...but for obvious reasons this is very clumsy
theMat_Diffuse = theMat.Diffuse
theMat_Diffuse = theMat_Diffuse as string
map_str1 = "meditMaterials" + "[" + current_slot + "]" + ".Diffuse "+ "= " + theMat_Diffuse
format map_str1 to:mat_file
FORMAT INI_BREAK to:mat_file
etc
then I repeat it ...you can see the dumb ugly code attached- it aint pretty!
Is there a way to loop & pick up the properties and the value of the material and any maps without coding things so badly? I have spent hours trying to get a loop that will work and I am getting no where
thanks
Mike