When i have to hop from 24 frame scene to 30 fps i usually do this:
mc.currentUnit(time="film")
sf = 1.0 (or 100, or 1000 - whatever is the standard in your studio)
handle = 0 (most shots have in/out handles - usually 5 to 10 frames before/after the shot start/end frames)
scale = 30.0/24.0
offset = scale * (sf+handle) - (sf+handle)
ef = scale * ef - offset
mc.currentUnit(time="ntsc")
mc.playbackOptions(min=sf, ast=sf, max=ef, aet=ef)
This obviously will require animation keys tweak otherwise they will cause things to move "too slow" in the 30 FPS space:
for n in
mc.ls(type="animCurve"):
if mc.container(q=True, fc=n) == None:
mc.select(n)
try: mc.keyframe(e=True, iub=True, r=True, o="over", tc=-offset)
except: print("WARNING: Cannot move keys: "+n)
Finally because alembic readers (in the scene, if any) will need touch too:
l =
mc.ls(type="AlembicNode")
for n in l: mc.setAttr(n+".offset", -offset)
Using this approach you can align everything from existing 24 FPS scene to defined by you startup frame upon switching to 30 FPS. Very handy when the Game Studio guys come one week before you are delivering their game trailer or cinematic and say "btw, we decided that we want everything in 30 FPS, that shouldn't be a problem, right ?".
... crickets in the room ... :)
It would be great if Maya can do these simple manipulations without user intervention.