Notifications
Clear all

[Closed] <void>unfoldMap <integer>unfoldMethod

Hy,

I have been messing around with this method but i just can’t seem to get it to work.
I have a box in my scene and all i want to do is to apply a material and a UVW unwrap unfodl closest to face, seems easy no :s

So i have it working untill i have to use the “unfoldMap 1” method.
I have no idea how to properly invoke this method and what needs to be done before invoking it.

here is a sample

addModifier obj (Unwrap_UVW ())
obj.modifiers[#Unwrap_UVW].baseMaterial = matArray[matID]
obj.modifiers[#Unwrap_UVW].texMapList[1] = Bitmaptexture fileName: padArray[matID]
obj.modifiers[#unwrap_uvw].unwrap.setCurrentMap 1
obj.modifiers[#unwrap_uvw].unwrap.selectPolygons #{1…12}
-> insert unfoldMap here correctly <-

If anyone could help me it would be great

greets
Chubb

1 Reply

try this

(
local obj = selection[1]
select obj -- only 1 object must be selected to work with the Unwrap modifier
max modify mode -- that doesn't work if modify mode is not set
local theUnwrap = Unwrap_UVW () -- faster than using obj.modifiers[#Unwrap_UVW].xxx
addModifier obj theUnwrap
classof obj -- hack to force stack update
theUnwrap.unfoldMap 1
)

hope this will help you