makehumancommunity / mpfb2

MPFB2 is a free and open source human generator for Blender
http://static.makehumancommunity.org/mpfb.html
Other
303 stars 35 forks source link

Make all intra-module imports relative #208

Open joepal1976 opened 1 month ago

joepal1976 commented 1 month ago

The by far most annoying thing about blender "extensions" vs the traditional addon format, is that all imports in an extension needs to be relative. That's all and well for a project with ten files in three subdirs. MPFB however, has 450 code files distributed in a hierarchy which is up to five levels deep. In such a code base, relative imports soon become pretty messy.

Still, there's no arguing with it. In order to establish MPFB on the extension platform (#190), the imports needs to be changed. The good news is that this is a change which can be done without breaking backwards compatibility with blender 4.1 or the old addon format.

joepal1976 commented 3 weeks ago

Well, I think everything is relative now. It requires some quirky workarounds in the unit testing, but it works.

We'll see what happens when converting from legacy addon to extension. It should blow up on where I missed an import.