Check stack for collapsed mapping

Check stack for collapsed mapping

kenc
Advocate Advocate
577 Views
1 Reply
Message 1 of 2

Check stack for collapsed mapping

kenc
Advocate
Advocate

Hi All

 

How do I check whether a mesh has collapsed UVW mapping? As part of a maxscript I need to apply UVW mapping if it doesn't exist in the stack collapsed or not.

 

Thanks

0 Likes
Accepted solutions (1)
578 Views
1 Reply
Reply (1)
Message 2 of 2

kenc
Advocate
Advocate
Accepted solution

No takers in 2 weeks, so here's how I figured it out. Using code below, one for edit mesh and another for edit poly.

 

For edit mesh

count = 0
for t = 1 to meshOp.getNumMaps $ do
(
if meshOp.getMapSupport $ t then
(
count += 1
)
)

 

For edit ploy

count = 0
for t = 1 to polyOp.getNumMaps $ do
(
if polyOp.getMapSupport $ t then
(
count += 1
)
)

 

Draw a box with generate mapping unchecked and convert to edit mesh or poly. Run the appropriate code above. If there's mapping on channel 1 count will be 1. If there's mapping on channel 2 then count will be 2. Even if the mapping is collapsed.

 

You can also check the channels using TOOLS>CHANNEL INFO.

0 Likes