Skip to content

Instantly share code, notes, and snippets.

testAttributes = attributes testAttrs
(
rollout testAttr_RO "Test Attributes"
(
button test1_BT "Snap To Zero" width:160 height:30
button test2_BT "Snap To 10" width:160 height:30
on test1_BT pressed do
(
undo "Snap To Zero" on
import pymel.core as pmc
def fixupCyclicAnimLayers():
"""
This function finds animation layer nodes which are connected to themselves, disconnects them, and HOPEFULLY finds
the remaining unconnected animation curve, and plugs it back into the appropriate attribute.
:return: None
"""
import openMASH
import maya.api.OpenMaya as om
# initialise the MASH network data
md = openMASH.MASHData(thisNode)
# Need a reset frame and a delay amount
firstFrame = 1
frameDelay = 3