I understand Tools, Menus and Embedded scripts, but I've been having a very difficult time finding information regarding utility scripts. My understanding is that utility scripts are loaded as soon as Anime Studio is booted up and they appear to have information about animation channels. My current understanding is that we can declare functions within these utility scripts and then execute those functions from embedded scripts, is this correct?
Has anyone figured out if these utilities can be used to avoid having to use embedded scripts all together? In other words, have the utility check for the currently selected layer type and then interact with tools and menu scripts directly instead of having to hassle with embedded scripts. I would really like to have a custom keyframe channel for my sequencer WITHOUT having to embed on every image layer...
Utility scripts are no substitute for layerscripts. Only layerscripts run automatically for each frame, allowing us to change things that are not natively animatable. Utilities are just a place to locate functions that are used a lot and/or by many different scripts. It saves on having, say, the same 20 line function repeated multiple time in the same script, and allows the code to be maintained from a single function. If the next Lua version changes something, you'd only need to update the one function instead of many over several scripts.
Automatic layerscript loading? I didn't see you mention that before. Sure you can do that. We can embed scripts by script now, and I have a trick to automatically execute code on startup.
Having to embed a script wouldn't automatically load one on startup, unless you embed a custom startup file, in which case, you'd just embed the scripts you want in that startup file. I use the IsEnabled function of my auto-save tool to execute code on startup, as that function in tools is evaluated on startup, while the same function in menu scripts isn't evaluated until you select the scripts menu.
You just need to know the unique name of the layer you want to embed.