-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Importing addons #14
Comments
Interesting! I'm away on travel work and will have to look at this over the weekend. So you are doing I think that's invalid syntax, are you actually doing One of the problems here I think is that the Blender python system works very differently than Blender built as a Python module. That being said, I think your .dll is in the correct place for the Blender addon search method, but I'm not 100% certain that it is in the correct place for the Python .dll path. I'm going to have to look into this more when I get back from my work trip, but maybe you could try copying the .dll into your Let me do more reading and investigation; I'm sure something can be done to simplify the process. Thanks for your patience! |
Could you also make sure that your version of
|
On LuxCore's website it says 2.79b is required,
|
I tried to copy the addon to site-packages and some more tricks, nothing seems to work. |
Looking at your image there, you have the LuxCore renderer directory at the Blender application level directory
But really shouldn't this be
Trying to eliminate everything that I could debug from here. |
I don't think so because blender itself put it there. (After installation from the "user preferences"->"addons" menu) |
Okay, I will have to look at this over the weekend, then. I'm... not exactly sure what the interplay between the Blender as a Python module and a typical Blender addon would be at the moment. I've been solely focused on getting as many builds available as possible for different python versions. I'll let you know once I am back at my own machine for testing. Thanks again! |
Here's what I did:
I think this is correct though because here: LuxCoreRender/BlendLuxCore#138 (comment) They are saying that the version of Python also matters; you need Python 3.5. I'll try to get the other python version builds working soon. |
Most of the addons are compiled to python 3.5 because that what blender uses at the moment. Thanks a lot and keep up the good work! |
After compiling BlendLuxCore to python 3.6 it worked flawlessly, Thanks! |
@dorp92 Great! I'll still get those other builds working though. Thanks for the awesome example case! |
Hey, I tried to run
Same error with: import bpy
import addon_utils
addon_utils.enable(module_name="object_print3d_utils") Error:
|
@caniko2 very strange, I get an altogether different error:
Though
Makes me think this is because the GUI isn't initialized. |
Hmm, very probable. This add-on runs in the 3D view pane. I need the volume calculation tool of this add-on. What about my error? Another idea: Is there a way to get one function from the add-on? Maybe go into the source and grab it? Is there a more streamlined way? What do you think? I am talking about this function in particular (it calculates the volume of the active object): I don't have any other option for getting the volume. All I found was this stack forum. |
@caniko2 If you only need the query volume portion, that should be easy enough to import by itself; the add-on initialization in the 3d view is limited to only the However that doesn't tell the full story; what you actually probably want is the Here's what I would do (while being blissfully unaware of what your requirement actually is): import bpy
import bmesh
from object_print3d_utils.mesh_helpers import bmesh_copy_from_object
# Create an empty mesh and the object.
mesh = bpy.data.meshes.new('Basic_Cube')
basic_cube = bpy.data.objects.new("Basic_Cube", mesh)
# Construct the bmesh cube and assign it to the blender mesh.
bm = bmesh.new()
bmesh.ops.create_cube(bm, size=1.0)
bm.to_mesh(mesh)
bm.free()
bmesh_copy_from_object(basic_cube).calc_volume() Code for creating the new mesh taken from here Import your required function, create the object and calculate the volume as necessary. Some addons are specifically gui based, so your mileage may vary. |
Thanks for the help! I found the same solution as you did while digging through the source of the add-on. We are doing research on muscle cells. Each blender vertex represents a fluorescence protein, confocal microscopy. I need to calculate the geodesic distance, and get some other futures. Almost done :) |
Sounds cool, admittedly Chinese to me.
Hope your research goes well!
…On Tue, Jul 23, 2019, 8:57 PM Can H. Tartanoglu ***@***.***> wrote:
Thanks for the help!
I found the same solution as you did while digging through the source of
the add-on. We are doing research on muscle cells. Each blender vertex
represents a fluorescence protein, confocal microscopy. I need to calculate
the geodesic distance, and get some other futures. Almost done :)
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AFLEYR37YCSCE7QFSRXFAO3QA6SIRA5CNFSM4FUVCFLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2U26PI#issuecomment-514436925>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFLEYR5ARRQ4JMUXQILCB5LQA6SIRANCNFSM4FUVCFLA>
.
|
Information about importing addons has been added to the documentation, updating the readme with an FAQ now. |
Hello,
I am trying to import an addon called BlendLuxCore (https://luxcorerender.org/download/)
What I tried:
And I am getting:
Now the dll is where it should be:
And when I try the same thing from inside blender built in interpreter it works flawlessly:
What could be the problem and how can I fix it?
The text was updated successfully, but these errors were encountered: