Polyop.movevert with softselection gives different results than when moving by hand

Hi guys,

I have a script that moves the verts of one mesh to another but when I use polyop.moveverts with the useSoftSel as true I get a total different mesh than when I move the verts by hand. Any ideas why this happens?

Thanks,
Anton

I’ve never done it so I don’t know if it works at all. But try making sure you don’t have any strange units/scale?

Since you haven’t provided any code to look at I can only take a stab in the dark, but I have two suspicions.

1) You are only moving the selected verts, not all verts

It doesn’t matter how you specify the soft selection. You can paint it, lock it, or just select verts and let the automatic falloff do the job.

What does matter is that the operation to move the verts only affects the verts you specify. It will multiply the transformation by the soft selection amount, but you must specify each and every vert you want moved. You could easily specify all the verts in your mesh; anything outside the soft selection won’t move anyway.

– This will only move one vert, even with soft selection enabled
polyop.movevert $ #{1} [10,0,0] useSoftSel:true

– This will move only the verts affected by the soft selection
polyop.moveVert $ #all [10,0,0] useSoftSel:true

2) You are specifying the node’s baseobject, but not also specifying the node

In this case, it’s likely a a coordinate system issue. Is the node scaled, rotated, or sheared? If so, the transformation will be completely different. When the object to modify is specified as an editable poly, the coordinate system used is the local coordinate system for the poly.

– This will move the vert in the poly’s local space:
polyop.moveVert $.baseobject #{7} [10,0,0]

If you want it to be transformed in the currently specified coordinate space (eg, world space), you must also specify the node:

– This will move the vert in the current coordinate system:
polyop.moveVert $.baseobject #{7} [10,0,0] node:$

It seems a backwards to me, but, well, maxscript.

– This will also move the vert in the current coordinate system, as
– we are specifying a node, not an editable poly:
polyop.moveVert $ #{7} [10,0,0]

If neither of these is the issue, it’s going to be hard to help without a peek at how you are using this operation. Give us an example to work with.