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.
Related
so basically i am trying a change prefix command and i want to fix the directory
i am trying to do import cogs.json in this
file directory
I realize that i get the errorModuleNotFoundError: No module named 'cogs' because of the directory of files but i dont know how to fix the directory to go there
can anyone help?
`i am trying to go to the _json.py inside of the cogs folder, besides that i might try just moving the _json file into the bot folder if that might work
Use
from cogs import _json
also, if you want you can rename your local name for the package
from cogs import _json as jsonModule
if this doesn't work, try
from ..cogs import _json
For more help, please look at this https://docs.python.org/3/reference/import.html
Basically, my question is, why is it putting an underscore in front of my import path?
It says import path does not begin with hostname which I'm assuming is because it starts with an underscore.
I read somewhere this may have something to do with me screwing up my GOPATH, but I've tried moving it everywhere, inside the project folder, outside the project folder, in the default location, etc.
I'm new to go and this has come up a few times recently. Would appreciate any guidance!
So I was misunderstanding where my source code had to be.
For anyone in the same boat, it needs to be within the go path in the actual src folder.
I found this helpful.
I am trying to include a .d.ts file in my npm package for my (non-TypeScript) library.
I have the following in my package.json:
"typings": "./src/iter.d.ts",
But no matter what I put in ./src/iter.d.ts, whenever I try to use it in Visual Studio, I always get a "Cannot find module 'iterjs'" message.
To reproduce, create a new TypeScript app in VS (I'm using 2015 with TS 1.8.4), do an npm install iterjs, and add the following to app.ts:
import iter from 'iterjs';
I've tried modifying the local copy of iter.d.ts (under node_modules) in a desperate attempt to get anything working at all; my local copy currently has only the following content:
export declare function bob(object: Object, property: string): boolean;
export default bob;
I can verify that Visual Studio is finding and reading the iter.d.ts file (I can see it being read in Process Monitor every time VS opens app.ts); however, there's apprently something in the .d.ts file it doesn't like. I have read about a dozen blog posts, gone through the Handbook, and a half-dozen TypeScript issues on the subject, and have tried about 20 different ways of exporting anything from the .d.ts file, but VS always just gives the same error (Cannot find module 'iterjs').
Node-like resolution of .d.ts files in NPM packages only works for type definitions in proper external module format. The .d.ts in your repository is in ambient module format, to convert it to the correct format remove declare module "iter" and prefix every symbol you wish to export with export declare, oh, and replace export = iter with export default iter. You can find additional info at https://github.com/Microsoft/TypeScript/wiki/Typings-for-npm-packages
I'm stuck on running the BeeGO app using "bee run" it says
The thing is I've already have setup properly my GOPATH to D:/Web Dev/GO/BeeGO/test-project/
and also routers path does exist and I've tried to manual build the file but it doesn't generate an .exe file.
Anyone knows how to fix this?
I'm using Windows 8.1 Pro (64-bit)
Thanks
GO expects the directory structure under $GOPATH in following ways as described in code organization:
$GOPATH/src <--- where your source code goes
/pkg
/bin
Instead of placing your source files directly under $GOPATH (D:/Web Dev/GO/BeeGO/test-project/ for your case), you want to move your code under $GOPATH/src.
D:/Web Dev/GO/BeeGO/test-project/src/main.go
D:/Web Dev/GO/BeeGO/test-project/src/quickstart/routers/routers.go
D:/Web Dev/GO/BeeGO/test-project/src/quickstart/controllers/controllers.go
import path should be always starting from $GOPATH/src. routers.go can be always imported as import "quickstart/routers" and controllers.go can be imported as import "quickstart/controllers".
That's not how you import a package.
The import path is relative to $GOPATH/src. use:
import "quickstart/routers"
Finally fixed the bug from the framework,
What I did:
in main.go import from
"D:/Web Dev/GO/BeeGO/test-project/quickstart/routers"
I changed it to _"../quickstart/routers" make sure to include _ this means to import the library even if it is not used,
Then in the routers/router.go I changed the import path
"D:/Web Dev/GO/BeeGO/test-project/quickstart/controllers" to "../controllers"
It seems BeeGO doesn't generate the template properly and caused the build to fail.
Another possiblity for this error, is when you copy-paste code from the internet,
and
import "quickstart/routers"
became
import "quickstart/routers "
due to bugs in some CMS/Blog systems (notice the space at the end before the closing quote...).
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 ...