jesterKing / import_3dm

Blender importer script for Rhinoceros 3D files
MIT License
301 stars 38 forks source link

Linux? #73

Closed crazyrobinhood closed 2 months ago

crazyrobinhood commented 4 years ago

Is this compatible with linux?

portnov commented 4 years ago

Any news? :)

Moult commented 3 years ago

Bumpity bump :)

tsvilans commented 3 years ago

Apparently, Linux should be supported, according to: https://pypi.org/project/rhino3dm/

The add-on code should be compatible as well. The only thing that might need some debugging is the dependency installation, but if you're alright with sourcing rhino3dm for Linux and putting in the Blender modules folder, then you should be fine...

jesterKing commented 3 years ago

I'll test on my machine if the manylinux version works if I bundle it directly with a zip like I do for Windows and MacOS.

jwrush commented 2 years ago

Did you get it working?

I'm running ubuntu and blender 2.93, and I installed pip and then rhino3dm to the blender installation of python. If I go into the python REPL from the command line (ie, not through blender) I can import rhino3dm and then call r3d.File3dm.Read and load my file successfully.

From blender, however, if I try to try to activate the add-on, it fails due to not being able to locate Rhino3dm._Rhino3dm, along with a message telling me to restart blender. Restarting blender doesn't change the result. However, if I instead go to the scripting tab, I can manually import pip and then rhino3dm, and then if I go back to the add-ons page, I can successfully activate the add-on.

When I try to import a file, however, blender seg faults. The add-on is crashing on it's execuation of r3d.File3dm.Read, but the original exception is eaten, which is a pain because it works in the REPL.

stack trace:

# Blender 2.93.0, Commit date: 2021-06-02 11:21, Hash 84da05a8b806
bpy.data.window_managers["WinMan"].addon_search = "rhino"  # Property
bpy.context.space_data.system_bookmarks_active = 3  # Property

# backtrace
./blender(BLI_system_backtrace+0x20) [0xa591300]
./blender() [0xf5f97a]
/lib/x86_64-linux-gnu/libc.so.6(+0x3f040) [0x7fe730cb8040]
./blender(inflate_fast+0xea) [0xa5a6f8a]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(z_inflate+0x1587) [0x7fe6d2d56e27]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x829126) [0x7fe6d2d4c126]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x828aa7) [0x7fe6d2d4baa7]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x4157c4) [0x7fe6d29387c4]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x37d9f1) [0x7fe6d28a09f1]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x3b3404) [0x7fe6d28d6404]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x4f01e5) [0x7fe6d2a131e5]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x4f1eee) [0x7fe6d2a14eee]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x4f206d) [0x7fe6d2a1506d]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x4f00e8) [0x7fe6d2a130e8]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x196337) [0x7fe6d26b9337]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x1e5fd3) [0x7fe6d2708fd3]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x1d7b3b) [0x7fe6d26fab3b]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x1cba35) [0x7fe6d26eea35]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x1cbb95) [0x7fe6d26eeb95]
/home/rush/Desktop/blender-b/blender-2.93.0/2.93/python/lib/python3.9/site-packages/rhino3dm/_rhino3dm.cpython-39-x86_64-linux-gnu.so(+0x5d0fd) [0x7fe6d25800fd]
./blender() [0x8750793]
./blender(_PyObject_MakeTpCall+0x90) [0x8712470]
./blender(_PyEval_EvalFrameDefault+0x8f40) [0xf5bef0]
./blender() [0xf5201b]
./blender(_PyEval_EvalFrameDefault+0x59cc) [0xf5897c]
./blender() [0xf5201b]
./blender(PyVectorcall_Call+0x5f) [0x8711ecf]
./blender() [0x187c21d]
./blender() [0x184a365]
./blender() [0x130f4b9]
./blender() [0x1312a24]
./blender() [0x1312d0c]
./blender(wm_event_do_handlers+0x426) [0x1313456]
./blender(WM_main+0x20) [0x1309c70]
./blender(main+0x31e) [0xe872fe]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fe730c9abf7]
./blender() [0xf5c2fc]

# Python backtrace
  File "/home/rush/.config/blender/2.93/scripts/addons/import_3dm/read3dm.py", line 136 in read_3dm
  File "/home/rush/.config/blender/2.93/scripts/addons/import_3dm/__init__.py", line 137 in execute
hjalti-thor commented 2 years ago

+1 having problems with this

jesterKing commented 2 years ago

At the moment I don't have access to my Linux box, hopefullt again in a couple of weeks.

j2l commented 2 years ago

I'm also looking for this add-on to work on Linux

neopostmodern commented 1 year ago

I got it running just fine on Ubuntu 22.04 by using the Python 3.10 macOS Intel package.

Before activating it in Blender I had to:

sudo apt install cmake
pip3 install --user rhino3dm

Maybe a note can be added to README & release notes?

IronBob01 commented 1 year ago

I got it running just fine on Ubuntu 22.04 by using the Python 3.10 macOS Intel package.

Before activating it in Blender I had to:

sudo apt install cmake
pip3 install --user rhino3dm

Maybe a note can be added to README & release notes?

I'm trying to get it working on Linux Mint 20.3 with Blender 3.2 and this did not work for me. Is there anything else I can try to get it working?

Moult commented 1 year ago

@IronBob01 at a guess, can you make sure that the rhino3dm module is available to Blender's Python (which may be different to your system Python)?

jesterKing commented 2 months ago

Check v0.0.12 builds for Linux. Tested on Linux Mint 21.03 with Blender 4.1.