0

我尝试在我的 three.js 脚本中导出 3D 模型以使用。不幸的是,我不太熟悉 python 和所有 3D 的东西。

当我从 Windows shell 运行转换器脚本 (convert_obj_three.py) 时,出现错误。(脚本和模型在同一目录中。)

$ c:/Python33/python convert_obj_three.py -i couch.obj -o couch.js
File "convert_obj_three.py", line 781
print "WARNING: skipping morph [%s] with different number of vertices [%d] than the original model [%d]" % (name, n_morph_vertices, n_vertices)

                           ^
SyntaxError: invalid syntax

这是因为模型有问题还是我犯了错误?

4

1 回答 1

0

问题是您使用 Python 3 而不是 Python 2 来运行脚本。

蟒蛇2:

print ''

Python 3: print 是一个函数,没有关键字,所以它需要括号:

print('')
于 2013-04-25T11:53:43.133 回答