ScriptSpot home

Forum topic · General Scripting

get vertex-pos with maxscript

By Arashi2 · 2011-11-23

Description

Hello,

how can i print the position of every vertex in a editable poly object for each frame with maxscript?

thanks

Comments (3)
Mirko

Hi,

how about calling polyOp.getVert every frame?

Reply to Mirko
Arashi2

cant you post the simple code to help me?

i already saw that in the maxscript help, but it says it returns the pos. of ONE specific vertex, not of all of them

unlike the setVert, there all of a sudden i can put in a bitarray as vertlist

polyop.getVert node:

,also i put the object as node, node:$polyName, and it still returns world-coord.
and not the local-coord., is that not right?

IM USING MAXSCRIPT FOR THE FIRST TIME, SO.. OF COURSE I DO NOT NO NOTHING

p.s. i dont know how to call something every frame, i didn't look into the time-values section in the mxs-help yet

Reply to Arashi2
Panayot Karabakalov

example

obj = Sphere()
convertTo obj Editable_Poly

p = convertToPoly(Plane())
num_vert = p.GetNumVertices()

for t = animationRange.start to animationRange.end at time t do
(
	format "\nAt Time: %\n-----------\n" t
	v_coords = for vID = 1 to num_vert collect polyOp.getVert p vID
	print v_coords
)