Im currently fighting with 3dmax to give me the correct information regarding UVW maps. If I have 6 UVW unwraps listed in the modifiers window, all on different channels, and my current selection is editable mesh; 3d max will tell me that only 2 uvw channels exist when I use meshop.getNumMaps geometry[1]. Its not till I click the very top modifier, does it actually give me the correct number of UVW channels. So I tried to do the following work around, but I find it quite time consuming as it takes around 2 seconds to process for each object. I have also tried collapseStack, but that took the same amount of time and I would prefer to not collapse the modifiers list. Is there a faster way to get the information I need?
if (geometry[f].modifiers.count) != 0 then (
i=1
do (
if (geometry[f].modifiers[i].enabled and ((classOf geometry[f].modifiers[i]) == Unwrap_UVW or (classOf geometry[f].modifiers[i])== VertexPaint)) then (
modpanel.setCurrentObject geometry[f].modifiers[i]
found = true
)
i+= 1
) while (found == false and i <= geometry[f].modifiers.count)
)
if (meshop.getMapSupport geometry[f] 0) then (vertColor = 1)
for i=1 to meshop.getNumMaps geometry[f] do (
if (meshop.getMapSupport geometry[f] i) then (
textNum += 1
append mapVerts (meshop.getNumMapVerts geometry[f] i)
)
)
barigazy · 2012-07-14