【发布时间】:2016-05-25 10:21:38
【问题描述】:
我有一个 python 脚本保存到文件中。
test1.py
import maya.cmds as cmds
import sys
def process():
print 'working'
我需要在另一个 python 脚本中运行这个脚本中的函数,在 Maya 中。我有:
import sys
sys.path.append('J:\scripts\src\maya')
from test1 import process
test1.process()
但它给了我:
from test1 import process
# Error: ImportError: file <maya console> line 4: cannot import name process #
我在这里做错了什么?
('import test1'没有报错,所以路径是正确的)。
【问题讨论】: