regcs / AliceLG

A Blender add-on for the use of Blender with the Looking Glass holographic displays.
GNU General Public License v3.0
104 stars 23 forks source link

Interference with Blender's GLTF importer/exporter addon #108

Closed regcs closed 1 year ago

regcs commented 1 year ago

The following bug was reported on Discord.

Describe the bug The GLTF importer/exporter raises an exception when Alice/LG is also active.

To Reproduce Steps to reproduce the behavior:

  1. Enable both Alice/LG and the GLTF importer
  2. Try to import a gilt file
  3. an Exception is raised (see error log below)

Platform & Versions (please complete the following information):

Attach log files alice-lg.log

regcs commented 1 year ago

The issue is that numpy is installed with the opencv dependency into Alice/LG's lib folder. It installs the newest version, which is 1.24. However, in this version types like np.bool have been removed and should now be called bool. Since Blender itself relies on an older numpy version, the GLTF importer causes the exception because it is calling the new numpy.

How to solve?

Unclear at the moment. Maybe we can tell opencv not to download numpy and rely on Blender's version instead. Alternatively, we can check Blender's numpy version first and then install the same version into the lib folder prior to installing opencv. Have to take a deeper look into this.

BryanChrisBrown commented 1 year ago

could we reference an older version of opencv?

regcs commented 1 year ago

Yes, that is possible and might even be necessary if opencv relies on numpy 1.24. Can't tell for sure before looking into opencv. Actually, it would be the best if Alice/LG could just rely on its version and other packages would rely on their version. But I am not sure if this is possible at all. But I would like to check it out before trying anything else, because this would avoid future incompatibilities like this.

regcs commented 1 year ago

Note:

ToDo:

regcs commented 1 year ago

Should be fixed in Alice/LG 2.2. We specifically do not install the dependencies python-opencv anymore.