Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

UVW mapping modifier edit

UVW mapping modifier edit

Anonymous
Not applicable
339 Views
1 Reply
Message 1 of 2

UVW mapping modifier edit

Anonymous
Not applicable
This part of the script runs fine. However if there is an object that doesn't have a UVW Mapping modifier on it then the script will barf. What I need is to add a line to check to see if that modifier exists, but not sure of the syntax. Any ideas?
Here's the code snippet

objArray = geometry as array
-- get all geometry objects into array

for i = 1 to objArray.count do
(
objArray.modifiers.length = 128
objArray.modifiers.width = 128
)

Cheers
0 Likes
340 Views
1 Reply
Reply (1)
Message 2 of 2

Steve_Curley
Mentor
Mentor
If you want just the objects which have a UVW Map modifier:-

objArray = for o in geometry where (o.modifiers != undefined) collect o

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes