ozikazina / Hydra

Blender hydraulic erosion addon using OpenGL.
MIT License
21 stars 3 forks source link

Installation fails - glcontext doesn't get installed #11

Open klein-j opened 3 months ago

klein-j commented 3 months ago

I downloaded the Addon, installed it (to Blender 4.2) and installed moderngl in python. This was verified by opening Python inside Blender and running import moderngl.

Hydra does not seem to recognize this though. In the Blender Preferences, after activating the Addon the "Install ModernGL" Button lights up. Clicking it shows a Success message and a prompt to restart Blender. After restarting, the "Install ModernGL" Button lights up again.

Also, I do not find any Hydra Tab in the 3D Window or Image Editor as described. I assume this is due to an incomplete installation. Adding some screenshots to document the workflow in the Readme would be tremendously helpful. This addon looks really promising and cool and I want to try it out, but I get stuck :/

klein-j commented 3 months ago

I tried again using Blender 4.0 and Blender 4.1 (all on Windows). Same behavior as with 4.2. Installation is not recognized and I can't find any menu entries.

ozikazina commented 3 months ago

Hello, are you using Linux? Check and see if glcontext was installed alongside moderngl. If not you can install it manually for now (see the manual moderngl installation section in the Readme). python -m pip install glcontext I'll remove the check for glcontext in the next update as it is now optional. Also check the console for any messages after launch.

ozikazina commented 3 months ago

I've checked and moderngl-5.11 no longer installs glcontext even on Windows so that should hopefully be the problem.

klein-j commented 3 months ago

Thanks for the fast answer. Sorry, I forgot to mention that I was using Windows.

I was finally able to install glcontext and now the plugin loads and shows up in the UI.

There were some caveats though: Firstly, even when opening a CMD in the right folder (Blender 4.2\4.2\python\bin) a simple python.exe --version would (sometimes??) run the system default python rather than the local one. A ./python.exe fixes this. Secondly, it seems like pip also needs to be run with administrator privileges. I had a situation where, running Python from the folder, glcontext could be imported, but inside the python console in Blender it could not. Ensuring the two points mentioned above, now Python inside Blender finds both dependencies and the Addon seems to load correctly.

ozikazina commented 3 months ago

Oh yes, sorry about that, ./python.exe is the correct command and the Blender installation folder is protected on Windows. I'll keep this open until the next update when the checks are removed.