Maya / Python协助!有谁熟悉Maya API?

时间:2012-05-14 15:53:42

标签: python maya

所以..我想要做的是更改引用(即文件C:/User/Desktop/file01/Cindi.ma)..我将如何使用Python代码更改对C的引用:/User/Desktop/file02/Cindi.ma?任何帮助表示赞赏

1 个答案:

答案 0 :(得分:1)

import maya.cmds as mc

#First query the reference node name to replace reference. 
rfn = mc.file( "C:/User/Desktop/file01/Cindi.ma", q=1, rfn=1 )

#then use reference node name(rfn) to replace the path.
mc.file ( "C:/User/Desktop/file02/Cindi.ma", loadReference=rfn, type="mayaAscii", options="v=0")