1 回答

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
如果您不確定鏡頭對象的屬性名稱,則可以在此處找到它們。
如果您仍然有問題,我建議您粘貼來自腳本編輯器的錯誤消息,以便我們可以診斷出問題所在。
添加回答
舉報