Keyframes in swithlayer
Posted: Thu Dec 16, 2004 12:17 am
As in LUA to receive quantity keyframes in swithlayer and their values?
Code: Select all
local switchLayer = moho:LayerAsSwitch(moho.layer)
local countF=moho.document:EndFrame()
for i = 0, countF - 1 do
local curentF=switchLayer:SwitchValues():GetValue(i)
if (curentF~=switchLayer:SwitchValues():GetValue(i-1) or i==0)then
print (i.." "..switchLayer:SwitchValues():GetValue(i))
end
end
Code: Select all
local switchLayer = moho:LayerAsSwitch(moho.layer)
print (switchLayer:SwitchValues():CountKeys())
Code: Select all
local currentLayer = moho.document:Layer(i)
Code: Select all
local originalLayer = moho.layer
for i = moho.document:CountLayers() - 1, 0, -1 do
local mesh = moho:Mesh()
moho:SetSelLayer(moho.document:Layer(i))
moho:UpdateUI()
moho:UpdateSelectedChannels()
local mesh = moho:Mesh()
if (moho.layer:LayerType() == MOHO.LT_VECTOR) then
print ("Layer number:", i+1,"Layer name:",moho.layer:Name(),"Shapes:",mesh:CountShapes())
else
print ("layer", i+1,moho.document:Layer(i):Name())
end
end
moho:SetSelLayer(originalLayer)
moho:UpdateUI()
moho:UpdateSelectedChannels()