[Closed] meshop.setVert vs polyOp.setVert
hey guys, quick question.
Basically i’m aligning verts using the normal between verts.
when i used meshop.setVert i get what i want, but if i used polyOp.setVert, things seem to be offset. I’m calling them the exact same way, using the same variables. Could some one explain why i’m getting different results?
here’s my function for the setting
fn SetVertPostion index matrix =
(
case (ClassOf obj) of
(
Editable_Poly: ( polyOp.setVert obj index matrix )
Editable_mesh: ( meshOp.setVert obj index matrix )
)
);
i see something about polyOp having a “node:” option, but i’m not sure how that works, or if it applies.
The node: parameter may apply if the polyOp.setVert ends up doing its work in a coordinate system different from meshOp’s… though both take the same parameter and should act the same as long as you use them the same way.
You can try anyway… just pass it as “node:obj”.
( is ‘obj’ supposed to be a parameter of your function? )
If no luck – can you tell us more about the object you’re affecting / post a scene file?
here’s a test screen, and a version of my script in the zip file.
both should have their vertex’s selection stored…if not, the verts that need to be selected are
23, 28, 29, 30, 24
they are the same object, just one is mesh, and one is poly.
with those verts selected execute the script on both…on my machine, the mesh should operate accordingly, aligning the verts, where the poly will not.
If it works on your guys system, then its something local on mine thats causing the problem.
this is done on max9 sp 2.
your problem actually seems to be in line 18 where you get the vertex positions:
-- original
( return (obj.GetVertex index) )
-- corrected
( return (polyOp.getVert obj index) )
ah, i knew it was something stupid that i did…so i’m assuming GetVertex gets the vert in local coord?
thanks for taking your time out to look into it.