AssetBrowser: Add cleanup operator for asset index. #92335

Open
opened 2021-10-19 10:18:24 +02:00 by Jeroen Bakker · 4 comments
Member

Users can rename/relocate/remove asset libraries. When they do created indexes would lead to files that will not be used anymore. Having a cleanup operation would help the user to free space on their storage device.

Approach

Users can have multiple blender versions installed with different asset libraries configured. The challenge here is that you when cleaning up automatically you can clean up indexes that are still used.
The approach to help the user would be to have an operation with an option to filter what indexes should actually be cleaned.

Requirements

  • User should be able to remove all indexes [OP1].
  • User should be able to only remove indexes that aren't used by the current open blender version [OP2].
  • User should be able to remove indexes of a specific asset library [OP3].

Design questions

There are 4 locations where such an operation makes sense:

  • Blender Icon->System menu: Current cleanup operation works on the opened blend file, very hidden.
  • File -> Cleanup menu: Currently only shows cleanup operations on the opened blend file. [OP1, OP2]
  • Blender Preferences -> File Paths -> Asset Libraries: The cleanup operations we want to introduce works on multiple asset libraries so it might be a good location. Concern is that it is hidden far away and is very specific. [OP1, OP2, OP3]
  • Asset Browser Space -> Only shows/works on a single asset library. Adding a cleanup operation here might be confusing, or only when it targets the current index. What is already done automatically, so might not make much sense. [OP3] might fit here.
System Menu Operation Fit OP1 Operation Fit OP2 Operation Fit OP3
Blender Icon Not very discoverable Not very discoverable Not very discoverable
File menu Ok fit Ok fit Nok fit as the current library could not be visible in the current screen
Preferences Ok fit Ok fit Ok/Nok fit, when user actually want to use it the operator is far away
Asset Browser Nok Nok Ok

Looking at the table above I would propose to add OP1, OP2 to the preferences and OP3 to the asset browser space inside the edit menu.

Users can rename/relocate/remove asset libraries. When they do created indexes would lead to files that will not be used anymore. Having a cleanup operation would help the user to free space on their storage device. ## Approach Users can have multiple blender versions installed with different asset libraries configured. The challenge here is that you when cleaning up automatically you can clean up indexes that are still used. The approach to help the user would be to have an operation with an option to filter what indexes should actually be cleaned. ### Requirements - User should be able to remove all indexes [OP1]. - User should be able to only remove indexes that aren't used by the current open blender version [OP2]. - User should be able to remove indexes of a specific asset library [OP3]. ## Design questions There are 4 locations where such an operation makes sense: - **Blender Icon->System menu**: Current cleanup operation works on the opened blend file, very hidden. - **File -> Cleanup menu**: Currently only shows cleanup operations on the opened blend file. [OP1, OP2] - **Blender Preferences -> File Paths -> Asset Libraries**: The cleanup operations we want to introduce works on multiple asset libraries so it might be a good location. Concern is that it is hidden far away and is very specific. [OP1, OP2, OP3] - **Asset Browser Space** -> Only shows/works on a single asset library. Adding a cleanup operation here might be confusing, or only when it targets the current index. What is already done automatically, so might not make much sense. [OP3] might fit here. | **System Menu** | **Operation Fit OP1** | **Operation Fit OP2**| **Operation Fit OP3** | | -- | -- | -- | -- | | Blender Icon | Not very discoverable| Not very discoverable| Not very discoverable | | File menu | Ok fit | Ok fit | Nok fit as the current library could not be visible in the current screen | | Preferences | Ok fit| Ok fit| Ok/Nok fit, when user actually want to use it the operator is far away | | Asset Browser | Nok | Nok | Ok | Looking at the table above I would propose to add OP1, OP2 to the preferences and OP3 to the asset browser space inside the edit menu.
Jeroen Bakker self-assigned this 2021-10-19 10:18:24 +02:00
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscribers: @Jeroen-Bakker, @JulianEisel

Added subscribers: @Jeroen-Bakker, @JulianEisel
Member

I know we've planned this for 3.0 last week, but thinking about it, for me this isn't necessary for 3.0. It's a nice-to-have, but these caches won't be that big. So just having some left-over caches lying around isn't much of an issue. There's also no way to clear cached thumbnails, not in Blender and I think not in OSes either.


So your plan is to allow the user to select which exact libraries will get their cache cleared? I find that problematic UI design wise. How would the UI look like to select these? But more importantly, what do users see that identifies a library? The name? That would mean we have to store the asset library name in the cache, which is an issue if multiple Blender versions register the same library under a different name. Or we have to somehow synchronize the name between Blender versions...

Deleting a cache that is actually still used isn't that big of an issue. It'll just be recreated.

Some alternative ideas:

  • Check if the library is used by any of the preferences stored on the system (we know the paths to those). A .py script could do this quite easily I think.
  • Let the cleanup operator only delete caches that were saved with this current version.
  • In addition to this, there could be an operator variant that clears caches saved with any version older than the current one.
  • Store a last-accessed timestamp in the cache, caches that haven't been read for say 30 days are cleared.
I know we've planned this for 3.0 last week, but thinking about it, for me this isn't necessary for 3.0. It's a nice-to-have, but these caches won't be that big. So just having some left-over caches lying around isn't much of an issue. There's also no way to clear cached thumbnails, not in Blender and I think not in OSes either. --- So your plan is to allow the user to select which exact libraries will get their cache cleared? I find that problematic UI design wise. How would the UI look like to select these? But more importantly, what do users see that identifies a library? The name? That would mean we have to store the asset library name in the cache, which is an issue if multiple Blender versions register the same library under a different name. Or we have to somehow synchronize the name between Blender versions... Deleting a cache that is actually still used isn't that big of an issue. It'll just be recreated. Some alternative ideas: * Check if the library is used by any of the preferences stored on the system (we know the paths to those). A .py script could do this quite easily I think. * Let the cleanup operator only delete caches that were saved with this current version. * In addition to this, there could be an operator variant that clears caches saved with any version older than the current one. * Store a last-accessed timestamp in the cache, caches that haven't been read for say 30 days are cleared.
Jeroen Bakker removed their assignment 2021-11-03 10:49:30 +01:00
Member

General development task, nothing release specific.

General development task, nothing release specific.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
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
2 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#92335
No description provided.