what I want to do is, from a script, find out what items (points, bones ...) are being manipulated in an action.
Put another way, if I look at, say, the position animation channels of all the points in a mesh, I can see which ones are being moved.
(e.g. using if mesh:Point(j).fAnimPos:CountKeys() > 1 ...)
and the same code gives me the point motion keys in the action if I have the action timeline on screen.
What I can't figure out is how to access the animation channels in the timeline in an action without having the action timeline active in the workspace -- IOW doc:SetCurrentDocAction("action name") doesn't seem to work as I'd hoped?
Any one got any advice please?
how can I get at the timeline for an action from LUA
Moderators: Víctor Paredes, Belgarath, slowtiger
- hayasidist
- Posts: 3523
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: how can I get at the timeline for an action from LUA
I think actions are layer-specific, so what you need to do is probably use the moho.layer:ActivateAction("myAction") method, then do your point stuff, and then deactivate the action using moho.layer:ActivateAction(nil).
http://aslua.com/index.php?show=method& ... ion&id=562
http://aslua.com/index.php?show=method& ... ion&id=562
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
- hayasidist
- Posts: 3523
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: how can I get at the timeline for an action from LUA
Thanks Stan. that's it!!
===
and ... since it may help us update ASLua.com --
> for the record: smartbone layers are returned in the child layers of a bone layer but with a zero duration (non-zero duration in the bone layer itself) along with any layer-specific actions.
> and .. any idea what MohoDoc:SetCurrentDocAction and MohoDoc:CurrentDocAction actually do??
===
and ... since it may help us update ASLua.com --
> for the record: smartbone layers are returned in the child layers of a bone layer but with a zero duration (non-zero duration in the bone layer itself) along with any layer-specific actions.
> and .. any idea what MohoDoc:SetCurrentDocAction and MohoDoc:CurrentDocAction actually do??