Notifications
Clear all

[Closed] update map verts

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

4 Replies

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

yeah, I tried update(), but it didn’t seem to work

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

Thanks Enrico, I’ll give it a try tomorrow. –Jon