2013-04-25 72 views
0

导出要使用的3D模型的方法是在我的three.js脚本中。不幸的是,我并不熟悉python和所有3D内容。将.obj-model导出为three.js json-object导致python-errors

当我从windows shell运行converter-script(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 

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

回答

0

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

的Python 2:

print '' 

的Python 3:打印是一个函数并且没有关键字所以它需要括号:

print('')