简体   繁体   English

mayapy/maya.standalone 错误:没有 object 匹配名称:.aiTranslator

[英]mayapy/maya.standalone error: No object matches name: .aiTranslator

When I run this in mayapy :当我在mayapy中运行它时:

import maya.standalone
maya.standalone.initialize()
import maya.cmds as cmds
cmds.file("/Users/Desktop/test.ma", open=True, force=True)

Then I get this error:然后我得到这个错误:

RuntimeError: file: /Users/Desktop/dad.ma line 26: The camera 'perspShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 26: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 43: The camera 'topShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 43: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 59: The camera 'frontShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 59: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 76: The camera 'sideShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 76: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 90: The mesh 'pSphereShape1' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 90: setAttr: No object matches name: .aiTranslator
Error reading file.
Error reading file.

But when I run this in maya:但是当我在 Maya 中运行它时:

import maya.cmds as cmds
cmds.file("/Users/Desktop/test.ma", open=True, force=True)

Then executes just fine.然后执行就好了。

test.ma is just a new scene with one object in, nothing fancy. test.ma只是一个新场景,里面有一个 object,没什么特别的。 For some reason, running this trough the mayapy/maya.standalone I get this error出于某种原因,通过 mayapy/maya.standalone 运行这个我得到这个错误

You probably need to check if mtoa is loaded or not.您可能需要检查是否已加载 mtoa。 If not loaded then load it before opening the file.如果未加载,则在打开文件之前加载它。

import maya.standalone
maya.standalone.initialize()
import maya.cmds as cmds
if  not cmds.pluginInfo("mtoa.so", q=True, loaded=True):
     cmds.loadPlugin("mtoa.so")
cmds.file("/Users/Desktop/test.ma", open=True, force=True)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM