PDA

View Full Version : polyOp.setVert - change 1 coord?


scorpion007
12-30-2004, 11:25 PM
Hi, I was wondering if there is a simple way to change 1 coord of selected verts in a Epoly object. the polyOp.setVert method accepts a point3, but I want to only change 1 axis, so how could I do this?

The way I used to do it was use $.selectedVerts and set their pos.x attribute, but that wont work on a poly object with certain modifiers on top. Also if you get the current modifier from the stack and use that, the selectedVerts property doesnt exist for some reason.

Any ideas?

marktsang
12-31-2004, 01:56 AM
hi,

maybe this is too simple but is that what your looking for?



bleet = polyOp.getVertSelection $
for i in bleet do

(

blah = polyop.getvert $ i

blah += [0,0,2]

polyOp.setVert $ i blah

)


mark

scorpion007
12-31-2004, 10:25 PM
hmm, but doesnt your example add 2 units to the z axis? I just want to Set the value to an absolute, not relative.

thanks

marktsang
01-01-2005, 09:04 AM
hi,
you didn't specify that in the original question!
anyway here is the answer


bleet = polyOp.getVertSelection $

for i in bleet do

(

blah = polyop.getvert $ i

blah.z = 10

polyOp.setVert $ i blah

)

CGTalk Moderation
01-20-2006, 07:00 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.