-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use Blender export script? #143
Comments
This blog post is very old, meanwhile exporter, format and loading changed a lot. Current Blender exporter works with the Blender beta 2.56.0 and can be found here (or under corresponding location in your local repo clone): https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender In order to get this working, you will need to copy Python scripts from Three.js repo to corresponding location in your Blender installation. I don't know where Blender keeps its user data in OSX, but for example on Windows it is under Under this folder there should be directory structure as in Now under this When you reload Blender (or press Don't use yet scene export option, it's not yet finished, but if you uncheck it, you can export single selected mesh. This will generate model in ascii JSON format, which can be then loaded via Check Blender exporter or OBJ converter examples to see it in action (OBJ converter generates the same ascii JSON format as Blender exporter): http://mrdoob.github.com/three.js/examples/webgl_geometry_blenderexport_colors.html http://mrdoob.github.com/three.js/examples/webgl_objconvert_test.html https://github.com/mrdoob/three.js/blob/master/examples/webgl_objconvert_test.html#L196 Relevant piece of code is here:
|
When checking my Blender system information, I see the following: Blender home dir: /Applications/blender/blender.app/Contents/MacOS/.blender Default dir for scripts: /Applications/blender/blender.app/Contents/MacOS/.blender/scripts Default "bpydata/" data dir for scripts: /Applications/blender/blender.app/Contents/MacOS/.blender/scripts/bpydata User defined dir for scripts: -- not found Data dir "bpydata/" inside user defined dir: -- not found Default config data "bpydata/config/" dir: /Applications/blender/blender.app/Contents/MacOS/.blender/scripts/bpydata/config So I put the scripts import_threejs.py, export_threejs.py, and init.py into /Applications/blender/blender.app/Contents/MacOS/.blender/scripts |
You need to find where in your OS Blender keeps its own native importers / exporters and copy Three.js files there to keep the same pattern. Somewhere you should have folder structure like this:
Also check Blender console for eventual error messages or loading modules reports. Make sure you copy files to folder from the right version of Blender (must be 2.56a). At least on Windows, each beta keeps its files in a different folder, all start with version number (so above the folder structure I posted, there are |
Sorry for wasting your time alteredq. My issue was that my version of Blender wasn't the latest version. I thought I had downloaded the latest version just a couple of days ago, but I must have either not been launching the right version or I downloaded an old version. For future reference to those who have this problem too, the scripts folder is inside the blender.app in the Contents/MacOS/ folder, then the folder structure is as listed in alteredq's post above. |
Hi there guys, I tried to do what you explained, but with versions (2.56-beta, 2.56a-beta and 2.57b), all that I could find was: .../blender/2.56 (or2.57)/python/lib/ ... and there is a bunch of folders and python scripts but no folder named "op" or "scripts". I made a new folder inside this lib folder named io_mesh_threejs and then copied the .py files -- import_threejs.py, export_threejs.py and init.py inside -- It did not work :( Do I need to copy something else or did I just do the whole thing wrong? When I re-open blender and went to file-->export I didn't see the option -- Three.js (.js) -- with any of the versions. BTW, I'm using windows. Thanks for the help xD |
Deprecated file format error...? -TJ |
I haven't tried 2.57 yet but you can still download 2.56b from the blender site, and I got it to work on Ubuntu. where ~/Apps/blender-2.56-beta-linux-glibc27-x86_64 is the folder I uncompressed Blender to. |
Thanks. I got it to work, my problem now is that the file it outputs is in |
Hi, |
Windows 7 and Blender 2.57: copy folder https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender/2.57/scripts/addons/io_mesh_threejs
Start Blender, File -> User Preferences -> Add-Ons, search for Three.js, activate plugin. |
@ JCAZ Just copy the folder labeled "scripts" and paste it under the subfolder called "2.57". The structure should look like this: C:\Program Files\Blender Foundation\Blender\2.57\scripts\addons\io_mesh_threejs |
For Linux, I have created this tutorial: https://docs.google.com/document/pub?id=1eobAyKH5ajO_JQC7L3TQx5EnTO3P65JxlZGGCV94Q8A |
oh hi there tha1bu1, I hadn't seen your post sry and thanks for the help :) but I already had it working xD |
Hi! I was able to import now using three js but cant export. three.js option is listed but is inactive. What could have been the problem? |
excuse my English, I have version 2.66 of blender, is that the problem?. |
Seems as if the exporter doesn't work with 2.66 yet. I have tried the same thing (on Ubuntu) and also couldn't see the exporter in the add-ons list, while the same thing worked with 2.63 (the version that in the repos of my Ubuntu 12.10 installation) without problems. |
whether it was the version. |
Try to search the list of plugins. Scroll down to the bottom of plugins list - in my case it was at the end. I have Ubunut 12.04 with Blender 2.66 and the latest exporter and everything works correctly. |
should make a tutorial, but video |
i have 3d model created in blender now my task is to import and play that 3d human model in webgl using three.js |
Has anyone been able to get the three.js import export addon for Blender (2.66 or 2.65) to work on Windows 7 or Windows Vista I tried on two different computers. On windows 7 I placed the files in (I have blender 2.65 on this machine) On Windows Vista where I have blender 2.66 I placed the files in C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.66\scripts\addons I looked in the User Preferences and can not see the addon there. I also tried the filter etc. Please help! |
See the following error if I start blender from command line fake_module: addon missing 'bl_info' gives bad performance!: 'C:\BlenderInstall |
I figured out my problem. I had downloaded the files from github incorrectly and the python was enclosed in html tags. Have fixed that by making sure that the files only have python inside them. Now I can see the plugin and when I try to import a model I get the following error File "C:\BlenderInstall\Blender2.66\2.66\scripts\addons\io_mesh_threejs__init__.py", line 149, in execute return io_mesh_threejs.import_threejs.load(self, context, **self.properties) AttributeError: 'module' object has no attribute 'load' location: :-1 location: :-1 |
As stated in the guidelines, help requests should be directed to stackoverflow. This board is for bugs and feature requests. |
I have looked everywhere and tried to get the Blender export script working, but I seem to be completely unable to get the export to three.js functionality working. Everywhere I look refers to a certain blog post, but that website isn't functioning and hasn't for the past few days of me checking.
Has anyone successfully gotten the export scripts to work in Blender (under Mac OSX)?
The text was updated successfully, but these errors were encountered: