Three.JS plugin for Blender not working - three.js

I cannot install the Three.js plugin for Blender. I have a Fedora with Blender 2.69, I created the directory io_mesh_threejs in /usr/share/Blender ... /addon and copied the 3 .py files into but the plugin doesn't appear in the user preference.
I also tried with a downloaded 2.65 version of Blender with no success.
I did it for another library (Babylon.js) and it worked fine so I guess it comes from the python files ?

Here is what I did to get it to work with Win 7 - may work for you also.
Make sure you copy the text from the Raw File format instead of just right clicking and downloading the python files. If you right click and download you might get some additional html code that will break it. Someone else here made that suggestion previously.
Put the import and export files in the io_mesh_threejs folder. Put the init file in the root of the addons directory.
That did the trick for me anyway.

hopefully this adds to the conversation stream ... I've spent two hours finding this answer myself for IFC file imports for Blender ... I've just now got there ... I'm on a Mac with OSX and my Blender 2.71 is positioned in /Users/username/Documents/Blender ... I tried the User Preferences to no avail ... even followed the PATH to /Users/username/Library/Application Support/Blender/2.71/scripts/addons and manually copied the files in using shell ... still nothing ... then I found that the actual place they should go is
/Users/username/Documents/Blender/blender.app/contents/MacOS/2.71/scripts/addons
In my case for IFCBlender I then made a directory called
bash$ mkdir io_scene_ifc
Then I copied in the all the downloaded files ... Hooray this now appeared in my User Preferences ...

Related

Application doesn't launch from ZeroBrane Studio

I'm having a lot of problems with ZeroBraneStudio!
I enjoyed using it to write my first application on Windows, but now I fail to make it working on MacBook Air and even on WIndows after reinstalling Solar2D and ZeroBrane!
If I launch my app opening Corona Simulator everythings works well, but ZeroBrane doesn't work. The errors on MacBook and on Windows are similar.
On MacBook:
Program starting as '"/Applications/Corona-3664/Native/Corona/mac/bin/lua" -e "io.stdout:setvbuf('no')" "/var/folders/4w/hn6pxl5s20v31f0q2n9msjs40000gn/T/.bO0D1R"'.
Program 'lua' started in '/Applications/Corona-3664' (pid: 1638).
Debugging session started in '/Applications/Corona-3664/'.
SampleCode/Interface/Composer/main.lua:18: module 'composer' not found:
no field package.preload['composer']
no file './composer.lua'
no file '/usr/local/share/lua/5.1/composer.lua'
no file '/usr/local/share/lua/5.1/composer/init.lua'
no file '/usr/local/lib/lua/5.1/composer.lua'
no file '/usr/local/lib/lua/5.1/composer/init.lua'
no file './composer.lua'
no file './composer/init.lua'
no file './lua/composer.lua'
no file './lua/composer/init.lua'
no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer/composer.lua'
no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer.lua'
no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer/composer/init.lua'
no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer/init.lua'
no file './composer.so'
no file '/usr/local/lib/lua/5.1/composer.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/composer.dylib'
no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/libcomposer.dylib'
stack traceback:
[C]: in function 'require'
SampleCode/Interface/Composer/main.lua:18: in ma etc.
Please help me to understand what is going wrong!
Thanks
It looks like your project points to /Applications/Corona-3664/ folder, but it needs to point to the location of your project files, such that the require statement for your project modules work from that location (or you need to adjust package.path values so that Lua interpreter can find the modules you are loading).
In this particular case it looks like the application expects the composer.lua to be in the same folder as main.lua, so try setting your project folder to /Applications/Corona-3664/SampleCode/Interface/Composer/ (although it's better to keep it outside of Applications/ folder).

Writing .cargo/config.toml to allow rust code to be imported by python

I'm using rust-cpython to make a python module in rust. I've run my code on a linux os and it runs just fine but I get the familiar "linking with cc failed:exit code 1 error". I've gathered from this that I need to add the .cargo/config file to my project as suggested at the bottom of this:
https://github.com/dgrunwald/rust-cpython
I've copied and pasted their code into a file, config.toml, and place there in a directory, .cargo. I've tried nesting this in my src directory and my project directory with no success, what am I missing?
Solution found: Thought I'd post it as this gave me grief.
Everything with this setup is fine except the config file can't have the extension .toml despite being written in a toml format

How to package a Kivy app with Pyinstaller

I have a lot of troubles following the instructions form the Kivy website, many steps aren't explained like what should I answer to the warning.
WARNING: The output directory "..." and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)
Even if I choose y, the folder isn't removed.
Also should I always add these lines:
from kivy.deps import sdl2, glew
Tree('C:\\Users\\<username>\\Desktop\\MyApp\\'),
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)]
in the .spec file? Why are they necessary?
Not many info is available for Kivy.
Because I spent a lot of time understanding how I should package my app, here are some instructions that would have really helped me.
Some info are available at http://pythonhosted.org/PyInstaller/
Python 3.6 as of march 2017
Because packaging my app gave me the error IndexError: tuple index out of range, I had to install the developement version of PyInstaller:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
Step 1:
I moved all the files of MyApp in a folder "C:\Users\<username>\Desktop\MyApp": the .py, the .kv and the images and I created an icon.ico.
I created another folder C:\Users\<username>\Desktop\MyPackagedApp. In this folder I press Shift+right click and select open command window here.
Then I pasted this:
python -m PyInstaller --name MyApp --icon "C:\Users\<username>\Desktop\MyApp\icon.ico" "C:\Users\<username>\Desktop\MyApp\myapp.py"
This creates two folders, build and dist, and a .spec file. In dist/MyApp, I can find a .exe. Apparently, if my app is really simple (just one label), the packaged app can works without the Step 2.
Step 2:
The second step involves editing the .spec file. Here is an exemple of mine.
(cf Step 3, for the explanations about my_hidden_modules)
I go back to the cmd, and enter
python -m MyApp myapp.spec
I then got this warning:
WARNING: The output directory "..." and ALL ITS CONTENTS will be REMOVED! Continue? (y/n)
I enter y and then press enter.
Because I choosed y, I was surpised that the folder build was still there and that the dist/MyApp was still containing many files. But this is normal. PyInstaller can output a single file .exe or a single folder which contains all the script’s dependencies and an executable file. But the default output is a single folder with multiple files.
Step 3: adding hidden modules
When I click on the myapp.exe in dist/MyApp, the app crashed. In the log C:\Users\.kivy\logs\ I could find 2 errors: ModuleNotFoundError: No module named 'win32timezone' and SystemError: <class '_frozen_importlib._ModuleLockManager'>.
Because of this I had to edit the .spec file and add these lines:
my_hidden_modules = [
( 'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages\\win32\\lib\\win32timezone.py', '.' )
]
in a = Analysis I changed datas = [] to datas = my_hidden_modules,
Apparently this is because I used a FileChooser widget.
So, the line:
ALL ITS CONTENTS will be REMOVED!
yes, it will be removed AND replaced later with new files. Check the date. I think it prints permission denied if it can't do such a thin both for files and the whole folder, so you'd notice it. It's important though, because you need to add additional files into your folder.
Those additional files of two types:
kivy dependencies
application data
Dependencies are just binaries (+/- loaders, licenses, or so), you get them through the *[Tree(p) ...] piece of code, which is just a command for "get all files from that folder". Without them Kivy won't even start.
Similarly to that, the second Tree(<app folder>) does the same, but for your own files such as .py files, .kv files, images, music, databases, basically whatever you create.
Obviously if you remove the deps, app won't start and if you remove app data, you'll get some path errors and most likely crash. You don't want any of that :P
It also works if in the 'a = Analysis...' block in the spec file one substitutes
hiddenimports=[]
for
hiddenimports=['win32file', 'win32timezone']
for win32file, win32timezone or for whatever files are missing

Pelican plugins not found

I am testing out Pelican for my personal blog use but I am stuck with the use of plugins.
Apparently, the pelicanconf.py file is not picking up my plugins.
Here's a snippet of my pelicanconf.py:
THEME = '/Users/namely/Public/MyPersonalWorkspace/static_blog/static-blog/pelican-themes/pelican-bootstrap3'
PLUGINS_PATHS = ["./plugins","plugins","./pelican-plugins","pelican-plugins","/Users/namely/Public/MyPersonalWorkspace/static_blog/static-blog/pelican-plugins"]
PLUGINS = ["sitemap"]
My pelican setup for theme is correct since I am using the theme correctly. But somehow, it is not reading my plugin directories. The following is my folder structure:
static-blog/
content/
output/
pelican-plugins/
sitemap/
__init__.py
sitemap.py
Readme.rst
plugins/
sitemap.py
pelican-themes/
pelican-bootstrap3/
# and all pelican-bootstrap3's files
pelicanconf.py
publishconf.py
develop_server.sh
fabfile
Makefile
I am using Pelican 3.4, on a Macbook Air ( OSX 10.9.4 ), Python version 2.7.5
I am using a list of directories for PLUGIN_PATHS since all the directories didn't work ( either individually or in a list, relative or absolute. ).
My pelican installation is working fine since I can run my blog. It's just that the plugins are not working somehow. For plugins, I simply did a git clone from https://github.com/getpelican/pelican-plugins.
The error message I received was:
ERROR: Can't find plugin `sitemap`: No module named sitemap
Any advice is great!
Thank you all!
It might be something as simple as a typo in your settings file. As noted in the docs, the name of the relevant setting is PLUGIN_PATHS, whereas your settings file appears to contain PLUGINS_PATHS (note the spurious S).

Cannot export using three.js with blender 2.69

i'm trying to install three.js imports add on on blender 2.69, i'v tryed to copy the io_mesh_threejs into my ~/config/blender/2.69/script/addons but no entry in my blender addon menu.
I then move the __init__.py file there :
io_mesh_threejs into my ~/config/blender/2.69/script/
and then i have the entry menu, that i then select.
i tryed to export the basic cube to test it, but i have an error message :
.../init__.py", line 336, in execute import io_mesh_threjs.export_three.js
importError:No module named'io_mesh_threejs'
location:<unknow location>
---- my solution -----
I'm not sure it's the right way, but anyway, i copy the init.py and the 2 other file (import and export one) and put them dirctly on the addon repertory : /usr/share/blender/(...)/addons/
as it seems not to find the io_mesh_threejs i then change the line 336 and 337 of the __init.py file as this :
import export_threejs
return export_threejs.save(self, context, **self.properties)
it seems to work as i've now a threejs-test.js (the name i gave when saving) file in my personal dirctory, and when i open that file i've got an object.
i then trid the import module, it seems that the same tweak had to be done on line 146.
Now export and imports work
if it can help.
i then try to copy the directory io_mesh_threejs in the modules' one but noting better, as well as moving __init__.py on the /usr/share/blender/.../addon one
i read that people succed in using this plugin with 2.69, so i'm looking for help, thanks by advance :)
I had the exact same issue. Instead of messing with the files i just restarted blender. That worked for me. Not sure why you had to change the files.

Resources