ScriptSpot

Forum topic · General Scripting

Check if an object has a material (map) that uses Real-World Scale?

By JensSchmidt · 2017-09-05

Description

Hej guys & gals,
I can´t figure out how to check if a material/sub-material uses a map with "Use Real-World Scale" ticked, is there anyone here with this knowledge?
/ Jens

Comments (2)

jahman · 2017-09-09

collect all instances of StandardUVGen class that depend on any of your material/submaterial
check mxs reference or google for refs.dependents

and then do whatever you like.

this example will enable realWorldScale for all scene textureMaps (not only bitmaps)

(getclassinstances StandardUVGen).realWorldScale = true

btw. note that any third-party texturemaps like vray, corona etc may have this property right in the texturemap, so you may also check these maps for the according property

Thank you jahamn, I'll see

JensSchmidt · 2017-09-15

Thank you jahman, I'll see what I can do with it :)