Hubs-Foundation / hubs-blender-exporter

The Hubs Blender Add-on enables artists to export their creations to the immersive web with Hubs
Mozilla Public License 2.0
165 stars 51 forks source link

Support for user components directories #290

Closed keianhzo closed 3 months ago

keianhzo commented 4 months ago

This PR adds support for custom user components directories.

The user can add multiple directories and the components found in those directories will be loaded at add-on load time.

We don't do hot reloading as it can get quite complex quickly and Blender already requires reload for it's own scripts paths AFAIK.

Required by https://github.com/MozillaReality/hubs-postprocessing-addon Closes https://github.com/MozillaReality/hubs-blender-exporter/issues/288

Exairnous commented 4 months ago

Oh, I just realized, when add/removing directories, the preferences should be marked dirty: context.preferences.is_dirty = True

This is for when the user has selected that preferences shouldn't auto-save.