WIP: #125449, but brings back tool slots design #126030

Closed
Julian Eisel wants to merge 23 commits from JulianEisel/blender:temp-brush-assets-gpencil-toolslots into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

No response

_No response_
Julian Eisel added 16 commits 2024-08-07 12:40:12 +02:00
This way we can query the brush types, e.g. to filter out eraser brushes
in the brush asset selector while the eraser tool is selected.

Technically a brush may have different brush types depending on the
mode. So we store a type for all supported modes.

Ideally the name of the custom metadata property would match the name of
the properties in RNA. However these should be renamed to avoid the term
"tool", see #124201, and we currently don't do versioning of asset
metadata. So this uses what I expect the name will be. Could create a
separate PR to duplicate the RNA properties with the new name.
Allows selecting any grease pencil brush asset for drawing with the primitive
tools (Curve, Box, Line, etc) active. Brushes can be selected from the asset
shelf or the brush selector just like with the "Brush" tool.
Non functional yet, just displaying it in the toolbar.
Very hacky, just to see how this can work in principle. Changing to the
eraser or fill tool now activates the corresponding default brush.
There's an option now to flag tools as using brushes. Previously this was done
by setting the `data_block` field for tools, but this was weird naming, and was
causing issues with the logic to switch brush assets when switching tools.

Dynamically setting `data_block` based on the current brush, as we'd do with
brush assets now, means that we couldn't differentiate anymore between tools
that supported any brush, or only brushes of a certain type. The `data_block`
field is still there, but now is used only to indicate that a tool requires a
certain brush type. I can rename this later still.

This way we know now if a tool requires a certain brush type or supports any
brush type, and can set the active brush accordingly when switching tools.
Avoids confusion
Very hacky, crashes on startup. To be continued.
Julian Eisel added this to the Brush Assets & Asset Shelf project 2024-08-07 12:40:29 +02:00
Julian Eisel added 7 commits 2024-08-08 12:57:04 +02:00
Author
Member

Merged this into !125449 already, and did further improvements.

Merged this into !125449 already, and did further improvements.
Julian Eisel closed this pull request 2024-08-23 15:57:12 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
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 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#126030
No description provided.