Page 1 of 1
Get list of all actions?
Posted: Wed Jun 23, 2010 6:14 pm
by ponysmasher
Is there a way in Lua to find out what actions exist?
I've managed to set actions, blend actions etc. But I just can't seem to find a way to get the names of all created actions.
Re: Get list of all actions?
Posted: Wed Jun 23, 2010 6:27 pm
by hothead
Posted: Wed Jun 23, 2010 6:53 pm
by VĂctor Paredes
uhm, Ponymasher, maybe you should ask to Rudiger, he is an expert scripter and have worked on very complex scripts using actions.
Posted: Wed Jun 23, 2010 8:39 pm
by Rudiger
selgin wrote:uhm, Ponymasher, maybe you should ask to Rudiger, he is an expert scripter and have worked on very complex scripts using actions.
Sorry, but I don't know any way of getting the list of actions for a layer (at least according to the 6.1 API that Mike posted). I actually requested this feature from Mike a few weeks before AS7 came out, so I doubt it made it in, but you could check the automatically generated API from within AS, just in case. You can check whether an action exists or not, so there's always the exhaustive option of checking every Action name possible, if you've got a few spare millenia, but I wouldn't recommend it

.
Perhaps you could use the old trick of parsing the source anme file for the info. For my morph dials scripts, I get my list of actions from the names of the bones, so I've never had to resort to doing this.
Posted: Thu Jun 24, 2010 1:12 am
by ponysmasher
Yeah, I looked through the generated API and couldn't find anything.
For now I'll just hard code the names since I use the same names for all character (it's for lip sync so I need the mouth names).
Thanks for the help though!