Finish Asset System Refactor #122439

Open
opened 2024-05-29 15:13:26 +02:00 by Julian Eisel · 0 comments
Member

Finish transition away from the file browser as basis for asset functionality, towards asset system.

Motivation

When the asset browser was introduced in 3.0, it was entirely based on the File Browser. Since then it became clear that we don’t just want an asset browser, but a whole asset system that makes asset functionality available throughout Blender. Plus, the file browser showed a number issues that are hard to fix, especially with its preview image and caching system.

A lot of work was done to transition to an asset system that is independent of the file browser. However, this transition remains unfinished, some important functionality is still based on the File Browser backend, bringing along its issues & limitations.

User Visible Problems:

  • Drastic flickering of asset previews on common actions, most notably editing options in the Adjust Last Operation panel - #93726, #100716, #112038, #119289
  • Displaying asset previews outside the asset browser loads previews of all assets, adding potentially 100s of megabytes to memory that stay until Blender is closed - #111614
  • Blender freezing continuously for long periods when displaying huge asset libraries in the asset browser
  • Files don't appear in File Browser while Asset Browser loads assets - #89783 (fixed with e02e78d840)
  • Seemingly slow loading of previews outside of Asset Browser
  • Odd BPY design choices and properties documented as "temporary design"

It seems like a good time to finish this refactor, now that designs have evolved but before technical debt gets too big and the system too complex to refactor. Should also help with future projects, like online asset repositories.

Tasks

  • Rewrite preview handling - fixes previews flickering on undo/redo & improves loading performance in the asset shelf.
    • Use general UI preview system for async loading and display in asset UIs and the File Browser - rather than relying on the file browser with its own implementation.
    • Garbage collector for unused previews
    • Query asset previews via asset system
  • Port remaining functionality to the asset system
    • Loading assets from current file
    • Loading assets from disk
    • Loading assets from asset index
    • Sorting assets (in order: By catalog, by name, by date, …)
  • Garbage collector for assets/libraries that are not being displayed?
  • Remove legacy AssetHandle type (except where needed for BPY compatibility). This is a wrapper around a file of the file browser backend. Once the asset system handles previews, this is unnecessary finally.
Finish transition away from the file browser as basis for asset functionality, towards asset system. ## Motivation When the asset browser was introduced in 3.0, it was entirely based on the File Browser. Since then it became clear that we don’t just want an asset browser, but a whole asset system that makes asset functionality available throughout Blender. Plus, the file browser showed a number issues that are hard to fix, especially with its preview image and caching system. A lot of work was done to transition to an asset system that is independent of the file browser. However, this transition remains unfinished, some important functionality is still based on the File Browser backend, bringing along its issues & limitations. **User Visible Problems:** - Drastic flickering of asset previews on common actions, most notably editing options in the _Adjust Last Operation_ panel - #93726, #100716, #112038, #119289 - Displaying asset previews outside the asset browser loads previews of _all_ assets, adding potentially 100s of megabytes to memory that stay until Blender is closed - #111614 - Blender freezing continuously for long periods when displaying huge asset libraries in the asset browser - ~~Files don't appear in File Browser while Asset Browser loads assets - #89783~~ (fixed with e02e78d840b0) - Seemingly slow loading of previews outside of Asset Browser - Odd BPY design choices and properties documented as "temporary design" It seems like a good time to finish this refactor, now that designs have evolved but before technical debt gets too big and the system too complex to refactor. Should also help with future projects, like online asset repositories. ## Tasks - [ ] Rewrite preview handling - fixes previews flickering on undo/redo & improves loading performance in the asset shelf. - [ ] Use general UI preview system for async loading and display in asset UIs and the File Browser - rather than relying on the file browser with its own implementation. - [ ] Garbage collector for unused previews - [ ] Query asset previews via asset system - [ ] Port remaining functionality to the asset system - [ ] Loading assets from current file - [ ] Loading assets from disk - [ ] Loading assets from asset index - [ ] Sorting assets (in order: By catalog, by name, by date, …) - [ ] Garbage collector for assets/libraries that are not being displayed? - [ ] Remove legacy AssetHandle type (except where needed for BPY compatibility). This is a wrapper around a file of the file browser backend. Once the asset system handles previews, this is unnecessary finally.
Julian Eisel added the
Type
To Do
label 2024-05-29 15:13:26 +02:00
Julian Eisel added the
Interest
Asset System
label 2024-05-31 15:33:34 +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
1 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#122439
No description provided.