patrickfuller / blender-chemicals

Draws chemicals in Blender using common input formats (smiles, molfiles, cif files, etc.)
MIT License
187 stars 34 forks source link

Can´t get Blender-chemicals to find blender #8

Closed nilsgross closed 4 years ago

nilsgross commented 4 years ago

Hello, I´ve been at this for the last couple of days but I can´t get rid of this paticular problem. I´m not completly certain if I have openbabel properly installed but I really hope so because I followed the instructions as discribed and I can import pybel. I don´t wont to bother you with wrongly installing openbabel as some people already have.

Looking forward to your help and hope as soon as blender-chemicals knows where my blender is it will work and I´ll be happy.

> (python) PS C:\WINDOWS\system32> blender-chemicals c1ccccc1
> ==============================
> *** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
>   Cannot open aromatic.txt defaulting to compiled data.
> ==============================
> *** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
>   Cannot open element.txt defaulting to compiled data.
> ==============================
> *** Open Babel Error  in OpenBabel::OBBuilder::LoadFragments
>   Cannot open fragments.txt
> ==============================
> *** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
>   Cannot open element.txt defaulting to compiled data.
> Could not find installed copy of Blender. Either make sure it's on your path or copy the contents of `drawer.py` into a running blender instance.

OS: Win10 Blender: 2.82 Openbabel: 3.0.12 Blender-chemicals: 0.3.0

patrickfuller commented 4 years ago

I unfortunately don't have much experience getting this all running on windows. It looks like openbabel is unhappy... did you install via conda?

It also looks like blender can't be found, but I don't know how windows pathing works here.

Sorry I can't be of more help. I'd recommend going to openbabel forums and asking for help.

nilsgross commented 4 years ago

I guess I´ll just try it on Linux the coming days and hope for a better outcome...

nilsgross commented 4 years ago

I found the fix. The openbabel errors still persist but it will execute the comand regardless. all i had to do was alter this line in run.py to

mac_path = "C:/Program Files/Blender Foundation/Blender/blender.exe" with using / instead of \ for some reason i don´t understand.