Core: Make BLENDER_SYSTEM_SCRIPTS always add paths #122689

Merged
Brecht Van Lommel merged 1 commits from brecht/blender:system-scripts into blender-v4.2-release 2024-06-06 15:28:57 +02:00

Originally this would replace scripts that come bundled with Blender,
but it's unclear how this is useful.

Searching for this online mainly leads to people asking how they can
use it to add scripts. For example in a studio environment you might
want to deploy add-ons and startup scripts for all users.

Even if you wanted to use it for replacement though, it's not really
doing that and inconsistent for different types of scripts:

  • startup: ignored
  • modules: replaces bundled scripts
  • presets: adds to bundled scripts
  • addons (in 4.1): ignored
  • addons_core (in 4.2): ignored
  • startup/bl_app_templates_system: replaces bundled scripts

This change makes it add scripts from this path for all. This is a
breaking change, though arguably this feature is just broken to begin
with and not used much in practice because of that.

The alternative would be add a new set of environment variables to
avoid breaking existing behavior. But that also means keeping around the
broken behavior or fixing it in another way.

Supporting multiple paths may be used too, but for now just support
a single one as doing this for all BLENDER_SYSTEM variables is
non-trivial. The main use case for that would be add-ons anyway, and
those will mainly be handled through upcoming BLENDER_SYSTEM_EXTENSIONS
instead.

Ref #122512

Originally this would replace scripts that come bundled with Blender, but it's unclear how this is useful. Searching for this online mainly leads to people asking how they can use it to add scripts. For example in a studio environment you might want to deploy add-ons and startup scripts for all users. Even if you wanted to use it for replacement though, it's not really doing that and inconsistent for different types of scripts: * startup: ignored * modules: replaces bundled scripts * presets: adds to bundled scripts * addons (in 4.1): ignored * addons_core (in 4.2): ignored * startup/bl_app_templates_system: replaces bundled scripts This change makes it add scripts from this path for all. This is a breaking change, though arguably this feature is just broken to begin with and not used much in practice because of that. The alternative would be add a new set of environment variables to avoid breaking existing behavior. But that also means keeping around the broken behavior or fixing it in another way. Supporting multiple paths may be used too, but for now just support a single one as doing this for all BLENDER_SYSTEM variables is non-trivial. The main use case for that would be add-ons anyway, and those will mainly be handled through upcoming BLENDER_SYSTEM_EXTENSIONS instead. Ref #122512
Brecht Van Lommel requested review from Campbell Barton 2024-06-03 21:08:38 +02:00
Brecht Van Lommel requested review from Bastien Montagne 2024-06-03 21:08:38 +02:00
Author
Owner

This is something that has been bothering me for a while, and now that a bunch of stuff is changing because of extensions it seemed like a good moment to fix it.

Maybe we'll also need a BLENDER_SYSTEM_EXTENSIONS that behaves the same way, if that will become the preferred mechanism. But it's not clear to me yet if and how extension repositories work well with automated deployment, because it seems to require an index to be generated rather than just unzipping some files.

This is something that has been bothering me for a while, and now that a bunch of stuff is changing because of extensions it seemed like a good moment to fix it. Maybe we'll also need a `BLENDER_SYSTEM_EXTENSIONS` that behaves the same way, if that will become the preferred mechanism. But it's not clear to me yet if and how extension repositories work well with automated deployment, because it seems to require an index to be generated rather than just unzipping some files.
Author
Owner

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

I added a better summary of the state in #122512.
Brecht Van Lommel requested review from Sergey Sharybin 2024-06-05 16:18:30 +02:00
Brecht Van Lommel force-pushed system-scripts from 99d2245cb6 to f668f5facb 2024-06-05 16:28:15 +02:00 Compare
Author
Owner

This was discussed and agreed with all the reviewers, so it should be mostly a matter of checking the implementation.

This was discussed and agreed with all the reviewers, so it should be mostly a matter of checking the implementation.
Author
Owner

I changed the implementation to only support a single path for now.

I changed the implementation to only support a single path for now.
Brecht Van Lommel changed target branch from main to blender-v4.2-release 2024-06-05 16:29:36 +02:00

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR122689) when ready.
Sergey Sharybin approved these changes 2024-06-05 17:58:35 +02:00
Author
Owner

I'll give @ideasman42 an opportunity to look at this before I land it, otherwise will do tomorrow.

I'll give @ideasman42 an opportunity to look at this before I land it, otherwise will do tomorrow.
Brecht Van Lommel merged commit f7797a90f6 into blender-v4.2-release 2024-06-06 15:28:57 +02:00
Brecht Van Lommel deleted branch system-scripts 2024-06-06 15:29:00 +02:00
Sign in to join this conversation.
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
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#122689
No description provided.