Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # animation offset
- # select hirarchy
- # updated 7-10, actually works now :)
- from pymel.core import *
- sl = selected()
- #attrList = "translateX", "translateY", "translateZ","rotateX", "rotateY", "rotateZ"
- attrList = ["scaleX"]
- currentFrame = currentTime(q=1)
- offsetAmnt = 10
- offsetValue = currentFrame
- for s in sl:
- sC = [s]#listRelatives(s,c=1)
- maxSearch = 10
- while sC:
- if maxSearch == 0:
- break
- for attr in attrList:
- animCrv = sC[0].listConnections(t="animCurveTU")
- if animCrv:
- k = keyframe(animCrv, iub=1, r=1, o="over", tc = offsetValue)
- sC = listRelatives(sC,c=1)
- maxSearch -= 1
- offsetValue += offsetAmnt
Advertisement
Add Comment
Please, Sign In to add comment