Message 1 of 2
A macroscript that references PBR materials wrote only works if I evaluate it myself
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wrote a macroscript that changes the UV channels on materials of selected objects. It only works on physical and PBR materials, and only bitmap textures. It's a pretty simple script. My problem is, when I start up 3ds max, this script doesn't work on objects with PBR materials. To get it to work if I have to open the script in the editor and press CTRL+E.
I pinpointed the problem to a single line. As far as I can tell, this conditional statement gets interpreted as false first, then as true after manual evaluation:
if (classof CCmat == PBRMetalRough) then (...)
a similar condition for Physical materials works just fine "out of the box".
I have a test file plus the script attached.