Reputation: 427
I thought I'd post this here because hours of googling ended up fruitless. I have an obj file and I'm trying to use the python script included with three.js to export it for use in three.js however I have never used python before and don't know what I'm doing.
These have been my steps so far:
I've opened up the Python GUI, opened up convert_obj_three.py
, clicked run -> run module
, and then I get this:
======= RESTART: C:\three.js\utils\converters\obj\convert_obj_three.py =======
Usage: convert_obj_three.py -i filename.obj -o filename.js [-m morphfiles*.obj] [-c morphcolors*.obj] [-a center|top|bottom] [-s flat|smooth] [-t binary|ascii] [-d invert|normal]
When I try typing in something like convert_obj_three.py -i test.obj -o test.js
I get an SyntaxError: invalid syntax
error.
test.obj is in the same folder as convert_obj_three.py however that does not seem to be the issue as no matter what I type I seem to get a syntax error...
Upvotes: 1
Views: 302
Reputation: 6826
Run the command:
convert_obj_three.py -i test.obj -o test.js
at a command prompt. On Windows, Python will have to be in your path for this to work, that's an option in the installer (at least in 2.7) right at the bottom of the list of options, IME sometimes not visible - very easy to miss - so scroll down to find it.
Upvotes: 1