【发布时间】:2014-02-21 00:49:54
【问题描述】:
嘿,所以在使用 python 的 Maya 中,我正在导入用键控动画锁定的摄像机,我只是希望底部的时间滑块更新为导入摄像机的动画长度。我可以调整时间滑块我只是无法通过 python 找到关键帧来调整它。
(例如:我导入 4 个摄像头。1 个摄像头是 10 个关键帧。2 和 3 是 15 个关键帧。然后第 4 个是 52。所以我希望时间滑块为 1-52。我可以让它移动但我不知道如何找到数字 52)
编辑:对不起,基本上我导入了我的相机
cams = [cam1,cam2,cam3,cam4]
x 个摄像头:
cmds.file(x, i=True, dns=True, rnn = True) #i for import
# this is how i change the timeslider but I want it to
# be the number of keyframed animation on the camera
cmds.playbackOptions(max=1000)
【问题讨论】:
-
你能发布设置时间滑块并有一个相机对象可以工作的相关代码吗?
标签: python animation camera maya