Notifications
Clear all
[Closed] EditPolyMod positioning
Sep 15, 2011 1:13 am
Ok. I’ve hit a snag on this edit poly mod stuff.
Why does this first script work and the second one not! Even though they should be doing the same thing. I need to get the second one to work ideally. Help is very appreciated.
In the end it should move the selected Edit Poly Mod verts to 0,0,0 or any desired position.
fn functionX = (
ep = selection[1].modifiers[#Edit_Poly]
selVertArr = ep.GetSelection #Vertex -- BitArray
-- collect vert coords (Array of Point3)
p3Arr = for v in selVertArr collect ep.GetVertex v
-- changing Z only (into array elements)
for p in p3Arr do p[1] = 0 -- set new value
for p in p3Arr do p[2] = 0 -- set new value
for p in p3Arr do p[3] = 0 -- set new value
verts = selVertArr as array
for i = 1 to verts.count do (
selection[1].modifiers[#Edit_Poly].SetVert #{verts[i]} p3Arr[i]
)
)
functionX 1
fn functionX num = (
ep = selection[1].modifiers[#Edit_Poly]
selVertArr = ep.GetSelection #Vertex -- BitArray
-- collect vert coords (Array of Point3)
p3Arr = for v in selVertArr collect ep.GetVertex v
-- changing Z only (into array elements)
for p in p3Arr do p[num] = 0 -- set new value
verts = selVertArr as array
for i = 1 to verts.count do (
selection[1].modifiers[#Edit_Poly].SetVert #{verts[i]} p3Arr[i]
)
)
functionX 1
functionX 2
functionX 3
1 Reply