Brush Assets Tasks #116337

Open
opened 2023-12-19 12:53:31 +01:00 by Brecht Van Lommel · 7 comments

This is an overview issue of the work remaining to be done for brush assets. Implementing the design from #116338.

First Prototype

  • Initial version of brushes and thumbnails bundled in build (#104476) (Julian) -- c65b0ad144
  • Add appropriate tags to bundle brushes to make them show up in right modes (Julian) -- d9f2fce614, 5e813f1563
  • Asset shelves for all paint modes (Julian) -- 8be8f10305
  • Make brush asset activation operator work in all paint modes (Hans)
  • All brush tools replaced by a single brush tool that has all brush types (Hans)
  • Asset saving to single default library in Saved/Brushes/X.asset.blend files (Bastien)
    • User warning when opening and saving an 'asset' blendfile (!117346, dcc1894b89)
    • Basic operators in brush settings in sidebar (!117513)

Second Prototype

  • Asset shelf
    • Asset shelf sorts items first by catalog, then by name. (Julian) -- 91bc69f069
    • Rename Misc catalog to Utilities.
    • Asset shelf visible by default for sculpt and paint modes, workspaces. (Julian) -- b5d44d8f5d
    • Store available catalogs selection in preferences -- 2d7c804ebc
    • Add good per mode defaults for available catalogs -- 2c4f83d901
    • Bidirectional sync between active brush and select brush in asset shelf -- 128d9e142e
    • Lower default size to 40. -- 4e17d78a9b
    • Add duplicate and delete to right click menu (Hans)
  • Editing
    • Asset library selection in "Save As Asset" operator (Hans)
    • Catalog selection in "Save As Asset" operator
    • Fix Save As Asset not creating a new catalog in the user library (should not use the essentials UUID)
    • Allow renaming brushes (grayed out now)
  • UI:
    • Shortcut assignment for brushes (Hans) 44b80df241
    • Select asset brush by default instead of local brush (#118289) (Hans)
    • Fix tool getting hidden when no brush is selected f6898f9bcb
    • Move sculpt tool to Advanced panel (Brecht)
    • Hide custom icon unless not a local datablock and already enabled (Brecht)
    • Move Modes selection out of the way to panel under Brush Settings (Brecht)

Initial Merge to Main

  • Make asset shelf available as popup (Julian)
    • Decouple active catalog from asset shelf
    • Type to search immediately
    • Show small brush icon in header again
    • Operator to assign shortcut too
  • Asset Shelf
    • Option to save catalogs per region or in preferences
  • Default shortcuts for brushes (Hans)
  •  Complete brush asset operators (check TODO comments)
    • Save As Asset
      • Add default catalog path
      • Enable new catalogs in asset shelf #120531
      • Ability to choose preview image?
    • Delete (Brecht)
      • Confirmation
    • Update (Brecht)
    • Revert to Asset (Brecht)
  • Edit Asset operator for catalog, preview image, tags, author, etc #120081
  • Remove code for reset brush operator (Brecht)
  • Remove brushes from default startup.blend
  • Separate main storage
    •  Verify node editor main pointers
    •  Pack images and other external data
    • Refactoring for clarity
  • Image editor asset shelf and tool changes
  • Check various modes work correctly
    • Sculpt
    • Vertex paint
    • Texture paint
    • Weight paint
    • GPv2
    • GPv3 (brush assets use old object mode for now)
    • Particle edit
    • UV Sculpt
  • Share asset shelf settings between modes, except catalog?

UI

  • Consider moving button for popup into toolbar, with big brush preview image
  • Shortcut for cycling through brushes (through tag, or list of brushes in operator, ..). Unclear if needed~
  • Solution for current mechanism of shift for secondary smoothing brush
  • Make asset shelf update fast and not flickery
  • Asset browser editing
    • Duplicate and delete in right click menu
    • Edit metadata and save automatically just the metadata, and not other brush setting changes
  • Consider mechanism to show edited values as was possible with overrides

Editing

  • Trash mechanism to undo deletion
    • Add Move to Trash operator replace delete, based on auto created trash catalog
    • Operators in asset browser to empty trash or right click and delete
  • Single asset library can be marked as default in preferences (or not needed anymore?)
  • Reset to Defaults operator should be fixed
    • Move new defaults from essentials into the code, or get from essentials at runtime
    • Or consider deleting if too redundant with Revert to Asset
  • Asset Browser
    • Allow drag & drop to assign catalog for user library brush assets
  • Remove brushes from default startup.blend
  • Check it's compatible with GPv2 and GPv3 brushes

Technical

  • Refactor partial write code

Customize Read-Only Assets

  • Add asset weak reference to asset metadata, indicating which asset it replaces
  • Update asset shelf and browsers to hide such replaced assets
  • Add operator to replace essentials assets
  • Add operator to restore replaced assets
  • Integrate with trash catalog mechanism to delete read-only assets

Further Goals

  • Duplicate, Delete, Hide operators in asset browser
  • Show Hidden option asset browser
  • Update asset by drag & drop onto it
  • Consider editing assets in regular .blend files, with appropriate warnings
  • Indexing optimizations for multiple smaller .blend files
  • Ensure saved .asset.blend files are as small as possible and include no WM, screen, scene
  • Ensure empty .asset.blend files are deleted
  • Check if local brushes needs improvements
  • When opening a .blend file part of an asset library, show that in the window title
  • Support sharing brushes between modes
  • Auto generate custom icon?

Risks

  • The idea of having a single tool for brushes is untested. Design may change significantly based on user feedback, so get it as early as possible.
  • Design for how to store brush assets and especially their datablock dependencies in memory, separate from the scene data, is not well defined yet. It may be that merging things into the same main with a few tweaks will work, or a significant change may be needed to better support multiple main databases.

Current code:

This is an overview issue of the work remaining to be done for brush assets. Implementing the design from #116338. ## First Prototype * [x] Initial version of brushes and thumbnails bundled in build (#104476) (Julian) -- c65b0ad144 * [x] Add appropriate tags to bundle brushes to make them show up in right modes (Julian) -- d9f2fce614, 5e813f1563 * [x] Asset shelves for all paint modes (Julian) -- 8be8f10305 * [x] Make brush asset activation operator work in all paint modes (Hans) * [x] All brush tools replaced by a single brush tool that has all brush types (Hans) * [x] Asset saving to single default library in `Saved/Brushes/X.asset.blend` files (Bastien) * [x] User warning when opening and saving an 'asset' blendfile (!117346, dcc1894b89) * [x] Basic operators in brush settings in sidebar (!117513) ## Second Prototype * [x] Asset shelf * [x] Asset shelf sorts items first by catalog, then by name. (Julian) -- 91bc69f069 * [x] Rename Misc catalog to Utilities. * [x] Asset shelf visible by default for sculpt and paint modes, workspaces. (Julian) -- b5d44d8f5d * [x] Store available catalogs selection in preferences -- 2d7c804ebc * [x] Add good per mode defaults for available catalogs -- 2c4f83d901 * [x] Bidirectional sync between active brush and select brush in asset shelf -- 128d9e142e * [x] Lower default size to 40. -- 4e17d78a9b * [x] Add duplicate and delete to right click menu (Hans) * [x] Editing * [x] Asset library selection in "Save As Asset" operator (Hans) * [x] Catalog selection in "Save As Asset" operator * [x] Fix Save As Asset not creating a new catalog in the user library (should not use the essentials UUID) * [x] Allow renaming brushes (grayed out now) * [x] UI: * [x] Shortcut assignment for brushes (Hans) 44b80df241 * [x] Select asset brush by default instead of local brush (#118289) (Hans) * [x] Fix tool getting hidden when no brush is selected f6898f9bcb * [x] Move sculpt tool to Advanced panel (Brecht) * [x] Hide custom icon unless not a local datablock and already enabled (Brecht) * [x] Move Modes selection out of the way to panel under Brush Settings (Brecht) ## Initial Merge to Main * [ ] Make asset shelf available as popup (Julian) * [x] Decouple active catalog from asset shelf * [ ] Type to search immediately * [x] Show small brush icon in header again * [ ] Operator to assign shortcut too * [ ] Asset Shelf * [ ] Option to save catalogs per region or in preferences * [x] Default shortcuts for brushes (Hans) * [ ] Complete brush asset operators (check TODO comments) * [ ] Save As Asset * [x] Add default catalog path * [ ] Enable new catalogs in asset shelf #120531 * [ ] Ability to choose preview image? * [ ] Delete (Brecht) * [x] Confirmation * [ ] Update (Brecht) * [ ] Revert to Asset (Brecht) * [ ] Edit Asset operator for catalog, preview image, tags, author, etc #120081 * [x] Remove code for reset brush operator (Brecht) * [x] Remove brushes from default startup.blend * [ ] Separate main storage * [ ] Verify node editor main pointers * [ ] Pack images and other external data * [ ] Refactoring for clarity * [ ] Image editor asset shelf and tool changes * [ ] Check various modes work correctly * [x] Sculpt * [x] Vertex paint * [x] Texture paint * [x] Weight paint * [x] GPv2 * [x] GPv3 (brush assets use old object mode for now) * [x] Particle edit * [ ] UV Sculpt * [ ] Share asset shelf settings between modes, except catalog? ## UI * [ ] Consider moving button for popup into toolbar, with big brush preview image * [ ] ~~Shortcut for cycling through brushes (through tag, or list of brushes in operator, ..). Unclear if needed~~~ * [ ] Solution for current mechanism of shift for secondary smoothing brush * [ ] Make asset shelf update fast and not flickery * [ ] Asset browser editing * [ ] Duplicate and delete in right click menu * [ ] Edit metadata and save automatically just the metadata, and not other brush setting changes * [ ] Consider mechanism to show edited values as was possible with overrides ## Editing * [ ] Trash mechanism to undo deletion * [ ] Add Move to Trash operator replace delete, based on auto created trash catalog * [ ] Operators in asset browser to empty trash or right click and delete * [ ] Single asset library can be marked as default in preferences (or not needed anymore?) * [ ] Reset to Defaults operator should be fixed * [ ] Move new defaults from essentials into the code, or get from essentials at runtime * [ ] Or consider deleting if too redundant with Revert to Asset * [ ] Asset Browser * [ ] Allow drag & drop to assign catalog for user library brush assets * [ ] Remove brushes from default startup.blend * [ ] Check it's compatible with GPv2 and GPv3 brushes ## Technical * [ ] Refactor partial write code ## Customize Read-Only Assets * [ ] Add asset weak reference to asset metadata, indicating which asset it replaces * [ ] Update asset shelf and browsers to hide such replaced assets * [ ] Add operator to replace essentials assets * [ ] Add operator to restore replaced assets * [ ] Integrate with trash catalog mechanism to delete read-only assets ## Further Goals * [ ] Duplicate, Delete, Hide operators in asset browser * [ ] Show Hidden option asset browser * [ ] Update asset by drag & drop onto it * [ ] Consider editing assets in regular `.blend` files, with appropriate warnings * [ ] Indexing optimizations for multiple smaller .blend files * [ ] Ensure saved `.asset.blend` files are as small as possible and include no WM, screen, scene * [ ] Ensure empty `.asset.blend` files are deleted * [ ] Check if local brushes needs improvements * [ ] When opening a .blend file part of an asset library, show that in the window title * [ ] Support sharing brushes between modes * [ ] Auto generate custom icon? ## Risks * [ ] The idea of having a single tool for brushes is untested. Design may change significantly based on user feedback, so get it as early as possible. * [ ] Design for how to store brush assets and especially their datablock dependencies in memory, separate from the scene data, is not well defined yet. It may be that merging things into the same main with a few tweaks will work, or a significant change may be needed to better support multiple main databases. ------------------------ Current code: * Asset Shelf is in main. * Brush as assets: https://projects.blender.org/blender/blender/src/branch/brush-assets-project * Asset Repo Editing (formerly Draft): https://projects.blender.org/mont29/blender/src/branch/tmp-draft
Brecht Van Lommel added the
Type
To Do
label 2023-12-19 12:53:31 +01:00
Brecht Van Lommel added this to the Brush Assets & Asset Shelf project 2023-12-19 12:53:33 +01:00
Brecht Van Lommel changed title from Brush Assets to Brush Assets Tasks 2023-12-19 13:06:40 +01:00
Member

More things that would be good to decide how to handle:

  1. Shared brushes among multiple modes or duplicated with same Asset name
  2. Global smoothing slider for Shift
  3. Brush shortcut assigning and future "Cycle" behavior (Currently using G will cycle through all Grab brushes)

On the first point:
Atm the brushes between Vertex and Weight paint are shared. This is a good feature, even if it's inappropriate between these two modes.
We could share painting brushes between Sculpt, Vertex and Texture Paint Modes.
It might cause issues with brush setting incompatibility though.
If that's too much of a problem the brushes could be duplicated but should have the same name.

On the second point:
Right now when holding Shift the brush effect will be replaced with the last used Smooth brush.
This will be a big issue once we will have multiple Smooth brushes. By default there will definitely be two.
Effects like mesh and color smoothing should be a scene property that all brushes access.
In the case of the Paint brushes, the smoothing effect is even hard-coded ...

On the third point:
Brush shortcuts need to be assigned via the asset shelf ideally with right click.
The shortcut should be tied to the asset ID.
We could still support brush cycling if multiple brushes use the same shortcut?

More things that would be good to decide how to handle: 1. Shared brushes among multiple modes or duplicated with same Asset name 2. Global smoothing slider for `Shift` 3. Brush shortcut assigning and future "Cycle" behavior (Currently using `G` will cycle through all Grab brushes) **On the first point:** Atm the brushes between Vertex and Weight paint are shared. This is a good feature, even if it's inappropriate between these two modes. We could share painting brushes between Sculpt, Vertex and Texture Paint Modes. It might cause issues with brush setting incompatibility though. If that's too much of a problem the brushes could be duplicated but should have the same name. **On the second point:** Right now when holding `Shift` the brush effect will be replaced with the last used Smooth brush. This will be a big issue once we will have multiple Smooth brushes. By default there will definitely be two. Effects like mesh and color smoothing should be a scene property that all brushes access. In the case of the Paint brushes, the smoothing effect is even hard-coded ... **On the third point:** Brush shortcuts need to be assigned via the asset shelf ideally with right click. The shortcut should be tied to the asset ID. We could still support brush cycling if multiple brushes use the same shortcut?
Author
Owner

I've added these points to the list now.

I've added these points to the list now.

I put links in task for the two branches that have code related to this project currently.

Here is a quick status overview:

Brush Assets (brush-assets-project in blender repo)

  • Main features implemented from original design.
  • Known main TODOs:
    • Use tags to filter brushes based on current paint/sculpt mode
    • Handle doversion of existing local brushes.
    • Merge the brush tools into a single one in the toolbar.

Draft (tmp-draft in mont29 repo)

Highly WIP work, some of it now irrelevant since drafts themselves are not in the design anymore.

The main relevant part of this code is likely the BKE_asset_draft part (needs to be renamed of course), which contains some initial work to support opening, editing and saving back a blendfile into a dedicated Main, aside of the current file (global Main).

I put links in task for the two branches that have code related to this project currently. Here is a quick status overview: ### [Brush Assets](https://projects.blender.org/blender/blender/src/branch/brush-assets-project) (`brush-assets-project` in `blender` repo) * Main features implemented from original design. * Known main TODOs: * Use tags to filter brushes based on current paint/sculpt mode * Handle doversion of existing local brushes. * Merge the brush tools into a single one in the toolbar. ### [Draft](https://projects.blender.org/mont29/blender/src/branch/tmp-draft) (`tmp-draft` in `mont29` repo) Highly WIP work, some of it now irrelevant since drafts themselves are not in the design anymore. The main relevant part of this code is likely the `BKE_asset_draft` part (needs to be renamed of course), which contains some initial work to support opening, editing and saving back a blendfile into a dedicated Main, aside of the current file (global Main).
Member

Is Grease Pencil also part of the planning of the project? Can't find any info about this.

Is Grease Pencil also part of the planning of the project? Can't find any info about this.
Author
Owner

We have a bullet point for it, but not looked into it yet. We'd like this to handle all brushes, including grease pencil.

[ ] Ensure it's compatible with GPv3 brushes

We have a bullet point for it, but not looked into it yet. We'd like this to handle all brushes, including grease pencil. > [ ] Ensure it's compatible with GPv3 brushes
Member

@brecht Ok, thanks 👍

@brecht Ok, thanks 👍
Author
Owner

I updated the task list and #116338 with what we discussed regarding hiding and replacing read-only assets.

I updated the task list and #116338 with what we discussed regarding hiding and replacing read-only assets.
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 Assignees
4 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#116337
No description provided.