Asset System: Technical Design #87235
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#87235
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Asset System: Technical Design
Collaborative design work by @dr.sybren and @Severin.
NOTE: Also see #88184 (Asset System: Data Storage, Reading & UI Access).
Asset related concepts need to be integrated natively into Blender. This includes things like:
The asset system needs to interact well with asset related UIs. Because of this, they are designed together, with a well-defined interface between them.
The current system in master (experimental feature) is mostly limited to the Asset Browser, so all that can be done by the File Browser editor (which the Asset Browser is using), much of it was already there for managing files.
However there is currently an asset view UI template in the works, that supports displaying assets anywhere in the UI, so it has to work outside the File/Asset Browser context. Plus, in future we want to allow Add-ons to register custom libraries, dynamically populate asset libraries, provide non-Blender data-block assets, etc.
Given the importance of asset management, we want to have a well thought out design in place, with well defined interfaces for general Blender code and Python access.
Here's a basic visual presentation of how components could work together (BPY is to be designed still, may just mirror the asset system):
Initial design of the main interfaces and how that can be translated to the Python API.
We mocked up the main design units as code here, which for us (being coders) is a simple way to get a good grip of the design.
C++ Mockup
The highest level entity is the Asset System and provides basic functionality with global effect.
The
AssetListReceiver
andavailable_assets()
part may be superseded by the asset storage design (see {T88184}). In there the storage is managed throughAssetList
andAssetListStorage
(better separation of concerns).AssetSystem
can be a mere interface.It's unclear still if we need such full URIs in practice. It may also make sense to let asset management add-ons opt-out of URIs and use custom identifiers. The identifier could be just an abstract class with a purely virtual comparison operator.
We may want to differentiate between local and external assets here.
AssetRepresentation
could also be an (abstract) base class withLocalAssetRepresentation
andExternalAssetRepresentation
as implementations.This class needs a handle for C and RNA. E.g. so that operators can get asset information from context.
Python API
Most (but not all!) asset information is independent of the current file loaded. Exceptions are the Current File and the planned Current Project library. The Python API needs to work independent of
bpy.data
, but can do some interactions on it (e.g. after getting the ID of a local asset).Therefore, a new module might make sense.
Although maybe it shoudn't be a standalone module, it could be
bpy.asset_system
instead.The API would then simply wrap the internal C/C++ API.
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @JulianEisel
Asset System Technical Designto Asset System: Technical DesignAdded subscriber: @dr.sybren
Added subscriber: @AlexeyAdamitsky