three.js icon indicating copy to clipboard operation
three.js copied to clipboard

Cannot export using Blender 2.64 export script

Open ivanckt opened this issue 14 years ago • 8 comments

I put the 3 py files in "Blender\2.64\scripts\addons" in Windows, then in the preference, enabled the addon, but when i export things, it shows error and nothing is exported.

Trackback: File:"c:\Users\ivan\AppData\Roaming\Blender Foundation\Blender\2.64\script\addons_init__.py", line 337, in execute import io_mesh_threejs.export_threejs

ImportError: No module named io_mesh_threejs.export_threejs

ivanckt avatar Oct 30 '12 10:10 ivanckt

I'm having the same issue with Blender 2.7.1 on Mac. I installed and activated the addon but I get the same error as above when I attempt an export, and then the addon is disabled.

ConfidantCommunications avatar Jul 30 '14 20:07 ConfidantCommunications

Uh! Plugin breakage again? :(

mrdoob avatar Jul 30 '14 21:07 mrdoob

The original post stated

I put the 3 py files...

There isn't a reply otherwise but how this reads to me (and by looking at the path in the traceback) is that the three files were copied over and NOT the directly that they are contained in.

It sounds like his addons folder looked something like this

addons
├── __init__.py
├── export_threejs.py
└── import_threejs.py

which is incorrect

It should look like this

addons
└── io_mesh_threejs
    ├── __init__.py
    ├── export_threejs.py
    └── import_threejs.py

repsac avatar Jul 30 '14 22:07 repsac

I am using the correct folder name and could enable the addon.

ConfidantCommunications avatar Jul 30 '14 22:07 ConfidantCommunications

Good observation @repsac!

mrdoob avatar Jul 30 '14 22:07 mrdoob

I think @ivanckt had an incorrect setup and that your problem might be different as it loads for me on OS X. I have a custom setup in that I define my own scripts directory (as opposed to using Blender's internal path) but that shouldn't matter. This is my setup.

$ echo $BLENDER_USER_SCRIPTS
/Users/ed/scripts/BLENDER_USER_SCRIPTS
$ ls /Users/ed/scripts/BLENDER_USER_SCRIPTS/addons/io_mesh_threejs
__init__.py          export_threejs.py
__pycache__          import_threejs.py

and no issues on my end in loading the plugin.

repsac avatar Jul 30 '14 22:07 repsac

and I did a quick export as well just to make sure

repsac avatar Jul 30 '14 22:07 repsac

I fixed it. Originally I had navigated to the addons folder using the Mac Finder and created the io_mesh_threejs via Finder. I suspected that it was a permissions issue so I navigated there using Terminal and attempted to do a chmod on it, but it said "No such file or directory". I don't know why it did that, because the folder showed in both Terminal and Finder. Anyway, I created a new folder using mkdir and moved the .py files into there. The script now works as expected. Thanks for your help guys.

ConfidantCommunications avatar Jul 30 '14 22:07 ConfidantCommunications