This is a Maya python script used for randomizing keyframe values or times. When applied over a range, a different randomization will be applied to each attribute and each key for it. Using the GUI you can select what attributes to modify, whether to modify them in space and/or time, and the ranges for modification. First, copy&paste this into the script editor, select all of it, and save it to your shelf. Then, select the objects you want to adjust their keyframes and run the script.
The first two checkboxes are for space / time modification. Spatial Keyframes will modify attribute values for each keyframe. Temporal Keyframes will modify the frame that the keyframes are on.
Min / Max Randomness is the amount to be applied to each value. The amount is added, so 0-1 will only produce positive alterations and -1-0 will only produce negative alterations. The value is a floating point number, so 0-1 will always randomly choose a decimal in between.
Start / End Frames is the frame range for randomization to happen. Anything outside of this range will not be affected.
The list of values to change are on the right side. Every value checked will be randomized in the frame range specified by the amount specified. If you choose a master box, such as translation, it will affect the three associated boxes equally, like translateX Y and Z. So selecting translate and translateY will randomize all translate values and then only translateY afterwards.
If you need to edit any additional attributes, you can add them in the attributes[] list near the top of the script. Keep in mind, if all selected objects don’t have the attribute or you don’t call it exactly as PyMEL calls the attributes, the script might error out.
NOTE: This script requires PyMEL
For more scripts, check my blog:
https://blog.cameronleger.com/code/
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.