[Closed] unwrap uvw not setting values?
I have an odd issue where my maxscript doesnt update the unwrapuvw modifier, but if i do the same code line by line in the listener it works :S
-- place unwrap mod ontop of stack
mObj = $
mMod = unwrap_uvw()
addmodifier mObj mMod
max modify mode
mMod.unwrap.setVC true
-- set face vert numbers
for f = 1 to mCopyMapFaces.count do
(
mFaceVerts = mCopyMapFaces[f]
for v = 1 to mFaceVerts.count do
mMod.unwrap.setFaceVertexIndex f v mFaceVerts[v] -- this doesnt work in maxscript, but in listener it does
)
-- move verts
for v = 1 to mCopyMapVerts.count do
mMod.unwrap.SetVertexPosition 0 v [0,0,0] -- this doesnt work in maxscript, but in listener it does
not sure what im missing…
might be similar to this thread:
http://forums.cgsociety.org/showthread.php?t=723806 – “addModifier $ (CameraMap CameraNode:$Camera01)” doesn’t work
quick test here worked okay, though – can you dig up some values / code for your mCopyMapFaces and mCopyMapVerts?
mCopyMapFaces if just an array of map Face numbers and their appropriate vertecies
mCopyMapVerts is just an array of verts uv positions ive just put [0,0,0] as a test.
Wonder if it has anything to do with being in a function. Ok ill see what i can figure out.
ok i found the problem. When I change the channel from anything other than channel 1 this does not work
Does anyone know how to get the channel to change properly in the uvw modifier?
You probably need to call a Reset on the new UVW channel. In recent versions of Max when you change the channel it doesn’t automatically reset the data.
-Eric