I'm on the verge of releasing a version of my morph dials scripts, now with similar pose array support, and I was looking at this script to see if there were any optimizations I should consider adding. My script tends to bloat out the memory that AnimeStudio uses, so I was interested in adding some calls to Lua's collectgarbage function. Unfortunately, the syntax for this function seems to have changed from Lua 5.0 to 5.1, so your poses script doesn't currently work with ASP v6.0.
Lua 5.0 Manual wrote:collectgarbage ([limit])
Sets the garbage-collection threshold to the given limit (in Kbytes) and checks it against the byte counter. If the new threshold is smaller than the byte counter, then Lua immediately runs the garbage collector (see 2.9). If limit is absent, it defaults to zero (thus forcing a garbage-collection cycle).
So I was wondering if you, or Tim knew how to replicate the old functionality with this new syntax.Lua 5.1 Manual wrote:collectgarbage (opt [, arg])
This function is a generic interface to the garbage collector. It performs different functions according to its first argument, opt:
* "stop": stops the garbage collector.
* "restart": restarts the garbage collector.
* "collect": performs a full garbage-collection cycle.
* "count": returns the total memory in use by Lua (in Kbytes).
* "step": performs a garbage-collection step. The step "size" is controlled by arg (larger values mean more steps) in a non-specified way. If you want to control the step size you must experimentally tune the value of arg. Returns true if the step finished a collection cycle.
* "setpause": sets arg as the new value for the pause of the collector (see §2.10). Returns the previous value for pause.
* "setstepmul": sets arg as the new value for the step multiplier of the collector (see §2.10). Returns the previous value for step.
Thanks in advance