1 回答
![?](http://img1.sycdn.imooc.com/545861e40001199702200220-100-100.jpg)
TA贡献1845条经验 获得超8个赞
欢迎来到 SO,Fantasi。
你提出了一个非常模糊的问题,所以作为回报,你会得到一个非常模糊的答案。
您可以通过cmds.listConnections在您的音序器对象上使用来获取您的镜头列表。之后,使用for循环并使用以下方法获取镜头信息cmds.getAttr:
shots = cmds.listConnections("sequencer1", type="shot") or [] # Get a list of all shots from the sequencer.
for shot in shots:
shot_name = cmds.getAttr("{}.shotName".format(shot)) # Query shot's name.
start_frame = cmds.getAttr("{}.startFrame".format(shot)) # Query shot's start frame.
end_frame = cmds.getAttr("{}.endFrame".format(shot)) # Query shot's end frame.
print shot_name, start_frame, end_frame # Print out shot's info.
带有 2 个镜头的音序器的示例输出:
输出:
射击 1.0 50.0
射击结束 51.0 120.0
如果您不确定镜头对象的属性名称,则可以在此处找到它们。
如果您仍然有问题,我建议您粘贴来自脚本编辑器的错误消息,以便我们可以诊断出问题所在。
添加回答
举报