Hello. I want to share my script that I use in my animation projects. This is a simple tool for add some overlaps to your animation. Animation will bake to override layers, so your animation not will be deleted. RATE PLS IF YOU USE THE OVERLAPPY
Join to my Github - https://github.com/GenEugene/Overlappy
How to use:
For install just open script in script editor and press button "Save Script to Shelf".
- Selected objects must have keyed channels (translate or rotate).
- Script always creates override layers with baked animation. Use MOVE button to keep good animation. Then you can set the weight of the layer and bake again without losing the saved layers.
- !!! The default values range is optional. You can increase the maximum limit of Smooth and Scale to 10.0 by entering the value manually. Weight limit can be increased to 1.0. To reset sliders use Reset buttons.
- nParticle based
- baking to layers for every selected object
- work with cycles
- hierarchy mode
Simple FK chain of cubes.
Objects inside can be rotated and oriented as you like. (but dont forget about gimbal lock)
All objects have keys on start and end.
First cube has animation like pendulum. (for clear loop test)
Last cube has hidden locator with offset for proper operation of Rotation baking. (locator will be the aim for last cube and will not be simulated like other cubes)
RUN TRANSLATION BAKING:
Need to select 1 or more objects.
Objects must have keys on translate attributes, if you dont want to lose a pose before simulation, when translate layer will be deleted.
RUN ROTATION BAKING:
Need to select 2 or more objects.
Last selected object will be the target for the previous one.
If you select 2 objects, then 1 layer will be created
If you select 4 objects, then 3 layer will be created
If you select 1 objects, then layers no will be created, an error will come out.
Objects must have keys on rotate attributes, if you dont want to lose a pose before simulation, when rotate layer will be deleted.
For baking clear loops you need use 60+ fps.
On lower fps script can bake wrong loops.
Strong recomended to use animation minimum with 1 phase before and after animation cycle.
Simple way to do it just use pre and post infinity with "Cycle" option.
Or you can bake animation with off cycle checkbox into 3 or more loops, then move animation to your main animation range and delete remains.
Need to select roots only, hierarchy inside will select automatically.
Your hierarchy must be clear and linear:
In Translation baking if you select several objects and some of them have no hierarchy, there will be no errors and simulation calculates all objects.
In Rotation baking if you select several objects and some of them have no hierarchy, simulation calculates objects with hierarchy, then a warning will pop up with a list of objects without hierarchy. The simulation will not calculate them.
SPLIT CHAINS MODE:
This mode is only for Rotation baking. If you want to get the same result for the Translation baking, just use the Default mode.
Need to specify number of elements in each chain, then manually select objects.
SplitChains mode = 3 parts
6 objects selected:
Chain0 - obj1|obj2|obj3|obj4|obj5|obj6
Objects converts to 2 separate chains with 3 objects inside:
Chain1 - obj1|obj2|obj3
Chain2 - obj4|obj5|obj6
Dont forget that the last object in Rotation baking is not involved in the simulation and is the goal of the penultimate object.
DELETE MAIN LAYER:
Delete "OVERLAPPY" layer and everything inside it. (this layer does not need to select)
Dont forget to move baked layers with animation to safe layer by MOVE to safe layer button, if you need it.
MOVE TO SAFE LAYER:
This button moves internal layers from "OVERLAPPY" to new layer "SAVED_Overlaps", then the layer "OVERLAPPY" will be removed.
If the layer "OVERLAPPY" is empty or not yet created, then a error will pop up.
To activate tooltips need go to preferences/interface/help/Display ToolClips - activate checkbox.
Automatically select the hierarchy transforms of selected objects. (without shapes)
It works almost like maya's built in "Select hierarchy"
For reorientation aim in rotation script. May be useful when aim need reverse
*In future versions will be removed from ui
Clears all values in script window
p.s. This is my first script on maya python, so please report bugs and leave some comments, if you have ideas to modify the code