Code: Select all
mesh = moho:Mesh()
for i = 0, mesh:CountPoints() - 1 do
local v = LM.Vector2:new_local()
v = mesh:Point(i).fPos
print(v.x)
print(v.y)
end
or...
Code: Select all
mesh = moho:Mesh()
for i = 0, mesh:CountPoints() - 1 do
local v = LM.Vector2:new_local()
v = mesh:Point(i).fAnimPos:GetValue(0)
print(v.x)
print(v.y)
end
Rudiger is correct. fPos is direct access to the points position. fAnimPos you can get the value from a specific frame regardless of what frame you are on.
Generally I use fPos more because the code is simpler and you can CHANGE it and READ it much easier. fAnimPos must use..
to set the value and...
to get the value
fPos is easy, just "fPos = newPos" to change it. Of course that won't work if you want to change a position on a different frame.
I believe that fAnimPos is also needed to set a key frame... don't quote me... working from memory.
p.s. fAnimPos and fAnimAngle are very cool. I created a bone tool that would move and rotate bones only on frame 0 no matter what frame you were on. It was done ages ago for version 6 because of the sequencer. If a bone layer was slid BEHIND frame 0 of the document you couldn't reach frame 0 of that layer to move bones around.
-vern