0
我需要幫助做以下幾點:使用關鍵幀(),以顯示嵌套使用Python字典信息在Maya
使用關鍵幀方法(和標誌)來提取選定的一組按鍵的信息將它們存儲在嵌套字典。這些關鍵幀對應於動畫,根據需要將所有關鍵幀複製粘貼到其他關節上。我一直在梳理網絡上的文檔和不同的資源,但我正在使用我不熟悉的動畫術語和概念。 我稍後將訪問此字典,以在格式良好的窗口中顯示關鍵幀信息,以便我爲此寫作的藝術家可以在粘貼動畫之前查看效果。
我給這部分至今代碼:
else:
key_list = mc.copyKey()
# check to see if window exists already
if mc.window(copyAnim, exists = True):
mc.deleteUI(copyAnim)
# create window
copyAnim = mc.window(title="Transfer Animation Tool", backgroundColor= [0.3,0.3,0.3],sizeable=False,resizeToFitChildren=True)
#set the layout for UI
mc.columnLayout(adjustableColumn=True)
tx_src = mc.textFieldGrp(label="Source Object", editable=False, text=sel[0])
int_offset = mc.intFieldGrp(label="Frame Offset Amount", value1=0)
#displaying what info will be transferred - here is where I would use
#keyframe() instead -- getting an error because copyKey() returns an
#int which is not iterable. As you can see the return value for copyKey
#is being stored in key_list.
for key in key_list:
display_info = mc.textFieldGrp(label="Copy Value", editable=False, text=key_list[item])
鏈接到文件: http://download.autodesk.com/us/maya/2011help/CommandsPython/keyframe.html
您是否在尋找關於如何在UI中顯示信息或者如何解釋信息的建議? – theodox
我在尋找的是如何使用關鍵幀方法(或其他適當的方法)將關鍵幀信息存儲在嵌套字典中。我不確定如何使用此方法的標誌。稍後我將處理GUI顯示問題。 – BakMamba74