PDA

View Full Version : update map verts


jonlauf
04-28-2009, 06:35 PM
Hi,

I'm setting map verts manually on a scripted geometry plugin using meshop.setmapvert. This works fine, but only updates in the viewport after I apply a uvw unwrap modifier to the mesh. I can delete the modifier and the mapping remains correct. It's like it calls some mapping update function. Does anyone know how I might update the mapping in the viewport without having to add the modifier?

Thanks,
Jon

SyncViewS
04-28-2009, 06:59 PM
Hi,
I haven't tried it, doesn't 'update' work? I found an example in MaxScript Reference under "Accessing the Viewport Vertex Alpha Values".

update myMesh
- Enrico

jonlauf
04-28-2009, 07:00 PM
yeah, I tried update(), but it didn't seem to work

SyncViewS
04-28-2009, 08:32 PM
Hi Jon,
you're right, 'update' doesn't seem to do anything in this case. I made some tests and the behaviour is quite odd: by using 'meshop.setmapvert' sometimes the mapVert is updated other times it is not, randomly. So I found a quick and dirty workaround that seems to work always:

meshop.setNumMaps $ (meshop.getNumMaps $) -- actually doesn't do anything
ForceCompleteRedraw()
-- assuming $ is the Editable Mesh you want to update
- Enrico

jonlauf
04-29-2009, 12:28 AM
Thanks Enrico, I'll give it a try tomorrow. --Jon

CGTalk Moderation
04-29-2009, 12:28 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.