Extensions: Support loading add-on with manifest from script directories #122688

Closed
Brecht Van Lommel wants to merge 1 commits from brecht/blender:legacy-manifest into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Previously this would only work with the legacy bl_info. This way the
preference for additional script directories continues to work for
extensions using the manifest instead.

Ref #122512

Previously this would only work with the legacy bl_info. This way the preference for additional script directories continues to work for extensions using the manifest instead. Ref #122512
Brecht Van Lommel added 1 commit 2024-06-03 21:05:58 +02:00
Previously this would only work with the legacy bl_info. This way the
preference for additional script directories continues to work for
extensions using the manifest instead.
Brecht Van Lommel requested review from Campbell Barton 2024-06-03 21:06:15 +02:00
Author
Owner

I don't know if this opens a can of worms or if it's a simple change that should be fine. I tested it with some add-ons and they seem to be working ok, including preferences.

I don't know if this opens a can of worms or if it's a simple change that should be fine. I tested it with some add-ons and they seem to be working ok, including preferences.
Contributor

I'm wondering, if I set local repository with custom path that is outside the Blender version directory in appdata, will it not also act like custom script repo? Because I assume when you update to new version and import preferences, new version will continue reading from that custom repository.

If what I say is true, is custom scripts folder really necessary for extensions?

I'm wondering, if I set local repository with custom path that is outside the Blender version directory in appdata, will it not also act like custom script repo? Because I assume when you update to new version and import preferences, new version will continue reading from that custom repository. If what I say is true, is custom scripts folder really necessary for extensions?
Author
Owner

Many things are possible with enough work. But if you try to work out the steps to deploy a shared extensions repository in some automated way, it's complicated and that may cause studios to not bother and Blender becomes less useful.

Many things are possible with enough work. But if you try to work out the steps to deploy a shared extensions repository in some automated way, it's complicated and that may cause studios to not bother and Blender becomes less useful.
Author
Owner

I added a better summary of the state in #122512.

I added a better summary of the state in #122512.

Supporting extensions in Blender's scripts directories storing extensions as add-ons means we move back to supporting add-ons as top level modules again - this is something that I was never comfortable with (with the old add-ons) since it means add-ons sharing name-space with Python modules.

That's unavoidable to continue supporting this for legacy add-ons, for extensions we have the opportunity to deprecate the functionality.

While this patch seems fairly straightforward it has significant implications:

  • We would end up having to consider naming collisions with Python packages when reviewing extensions because some users may install extensions directly in their scripts directory.
  • There are two ways to install & access extensions - both as top level modules and sub-modules, meaning code paths for both need to be supported indefinitely, instead of eventually removing the deprecated code path for legacy add-ons.
  • Users will want want ways to manipulate extensions in the scripts directories, adding more overhead.

Blender supports local extension repositories, so I think it makes sense to use these for bundled offline extensions.

Supporting extensions in Blender's scripts directories storing extensions as add-ons means we move back to supporting add-ons as top level modules again - this is something that I was never comfortable with (with the old add-ons) since it means add-ons sharing name-space with Python modules. That's unavoidable to continue supporting this for legacy add-ons, for extensions we have the opportunity to deprecate the functionality. While this patch seems fairly straightforward it has significant implications: - We would end up having to consider naming collisions with Python packages when reviewing extensions because some users may install extensions directly in their scripts directory. - There are two ways to install & access extensions - both as top level modules and sub-modules, meaning code paths for both need to be supported indefinitely, instead of eventually removing the deprecated code path for legacy add-ons. - Users will want want ways to manipulate extensions in the scripts directories, adding more overhead. Blender supports local extension repositories, so I think it makes sense to use these for bundled offline extensions.
Author
Owner

Abandoning in favor of system repository design explained in #122512.

Abandoning in favor of system repository design explained in #122512.

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#122688
No description provided.