regcs/AliceLG

Interference with Blender's GLTF importer/exporter addon

Closed this issue · 5 comments

regcs commented

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):

  • OS: All
  • Blender Version: 3.4 (probably earlier versions as well)
  • Alice/LG Version 2.1

Attach log files
alice-lg.log

regcs commented

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.

could we reference an older version of opencv?

regcs commented

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

Note:

  • I figured that numpy is not required in the AliceLG/lib folder and opencv just installs it there, because it cannot find it in this folder
  • if numpy is deleted from AliceLG/lib, everything falls back to Blender's numpy version

ToDo:

  • check, if we can tell packages where to look for dependencies prior to installation
regcs commented

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