def reset_frame_range():
"""Set frame range to current asset"""
shot = api.Session["AVALON_ASSET"]
shot = io.find_one({"name": shot, "type": "asset"})
try:
edit_in = shot["data"]["edit_in"]
edit_out = shot["data"]["edit_out"]
except KeyError:
cmds.warning("No edit information found for %s" % shot["name"])
return
fps = {
"12": "12fps",
"15": "game",
"16": "16fps",
"24": "film",
"25": "pal",
"30": "ntsc",
"48": "show",
"50": "palf",
"60": "ntscf"
}.get(api.Session.get("AVALON_FPS"), "pal") # Default to "pal"
cmds.currentUnit(time=fps)
cmds.playbackOptions(minTime=edit_in)
cmds.playbackOptions(maxTime=edit_out)
cmds.playbackOptions(animationStartTime=edit_in)
cmds.playbackOptions(animationEndTime=edit_out)
cmds.playbackOptions(minTime=edit_in)
cmds.playbackOptions(maxTime=edit_out)
cmds.currentTime(edit_in)
评论列表
文章目录