Currently I am trying to write a script that performs the “Reset Current Keyframe” action, which reset’s points on a deformation chain. I’ve been searching within the Menus.Xml file, looking for it’s OnAction command, and I get no exact results. I’ve tried other possible alternatives, like “onActionDeformationPathEdit()”, which give me no results. My script is definetly reaching the code, because when I use simpler OnAction commands, like for selecting the brush tool, it works as expected.
I’m not sure if this tool simply doesn’t have a reference, or if it’s been named something different than listed in the program. Hopefully it’s the latter, because I’d really like to use this script to speed up my animation process.
This code isn’t very clean because I’m just trying to prototype the tool, but here it is: https://pastebin.com/iH1bJx1n
The call is injected in the menu via the plugin, you can find it C:\Program Files (x86)\Toon Boom Animation\Toon Boom Harmony 16.0 Premium\Plugins\DeformationCoreGui\resources
Call Action.perform(“onActionCopyRestingPositionToCurrentPosition()”, “miniPegModuleResponder”);
You can see more at https://docs.toonboom.com/help/harmony-15/advanced/scripting/scripting-reference.html and https://docs.toonboom.com/help/harmony-15/scripting/script/classAction.html
Technical Support Specialist
Toon Boom Animation
I’m really glad that I can get some scripting support on these forums.
I ended up creating the function by changing the deformer attributes manually. I’m going to change my code now so that it can be a bit cleaner.
It would be really helpful ToonBoom could update their documentation to either explain where we can find the names of attributes for specific node types, and onAction references, or include them as a list on the page itself. The only reason that I was looking through the Menus.xml file was because older forum posts clarified that we could find references there. I had no clue to search in the plugins folder, as none of ToonBoom’s info pages explain that.
Thanks for the help though, I very much appreciate it!
Hello, it is work only for selected node? But If i no have selected deformation node and i have variable (Necessary_Node) with necessary deformation node?
I don’t understand the question. I don’t know if you’re talking about scripts or not, but I ended up finishing mine.
Here it is, not sure if it helps.