ScriptSpot home

Forum topic · General Scripting

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

By Jens Schmidt · 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)
Panteleev Sergey

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