Design: Brush Assets Tool System Integration #126032
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
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#126032
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?
Detailed design for allowing tools to use brushes with the new brush asset system.
Much of this is already implemented (partially as WIP) in blender/blender!125449.
Motivation
Since brush assets were merged, all sculpt and paint modes have a unified "Brush" tool that is used for all brushes.
Based on feedback, some tools that use brushes should be brought back for the grease pencil draw mode. Namely the eraser tool and fill tool, but the primitive tools that are still present should also still be able to use any draw brush, as before.
This means we need to bring back some of the old behavior, where tools and brushes have some level of connection.
I can also imagine that we'd want to bring back some brush based tools in other sculpt/paint modes. For example the pose or cloth brushes are quite distinct from normal sculpt brushes. Having dedicated pose and cloth tools might be useful (the "Brush" tool still allows selecting pose and cloth brushes directly). So best to not hardcode this to the grease pencil use case too much.
Design
UI
This should give predictable behavior where the brush tool always gives access to all brushes, and users can optionally use tools for convenient access to special kinds of brushes, whereby the last used one is remembered.
Tool definition
The eraser tool would be defined like this:
Changes:
USES_BRUSH
flag (so "Brush" tool can still support any brush) -- blender/blender!125911brush_type
argumentdata_block
tool definition member. Not needed with the aboveSpecial Case: Grease Pencil Primitive Tools
The grease pencil primitive tools to draw shapes (lines, cirles, rectangles, ...) never set the
data_block
which usually indicated that a tool supported brushes. It was just forced to display a brush selector which happened to work. It doesn't anymore.Instead:
USES_BRUSHES
andbrush_type='DRAW'
Filtering Brushes in the UI
BrushAssetShelf.asset_poll()
filters out brushes when displayed in the popup (checked via context) based on the active tool (from context) and the asset metadata. -- Done in blender/blender!125449.Open Question: How to Connect Tools With Brushes?
We need to somehow...:
See first comment for possible solutions.
Solution 1: Bring back
PaintToolSlot
Proof of Concept: #126030
Bring back previous
PaintToolSlot
design, adopted to brush assets.PaintToolSlot
items stored inPaint
of each mode (scene data), indexed by brush typeAssetWeakReference
instead of brush directly, used brushes are now restored from asset libraries on load, not saved to filestoolsystem_ref_link()
updates active brush on tool changesSolution 2: Variation of
PaintToolSlot
name -> asset-reference
mapSolution 3: Store in the Tool Itself
AssetWeakReference
inbToolRef
Open Questions
restore_brush
inPaint
override_brush
toPaint
and return that fromBKE_paint_brush()
when set.This confuses me. So if you you have Eraser tool selected and click draw brush in asset shelf it will select Brush tool, but if you have Brush tool selected and click eraser brush in asset shelf it will NOT switch to eraser tool?
Yes exactly. You can do all painting with just the brush tool and don't have to switch back and forth to get all brushes available, only if you choose to use the tool system. Of course needs testing & feedback to see how it works in practice.
It is bit confusing imho. I think if you pick eraser from asset shelf it should switch to eraser tool (and same for bucket), otherwise its confusing when tool gets switched and when not. Photoshop brush system works the same - all brushes for all tools are always available in list, and when you pick a brush that is for different tool tool changes automatically. It makes sense and is good, proven workflow. Otherwise you have to know extra thing about system.
Committed in
3386761411
,b64bf66257
,65fdb3fa30
,d28956ab99
,a38c96b92c
&a79f9100a6
.