This task proposes a series of changes at UI and code level to make a new brush management system for sculpt mode that is compatible with the design of the new tools.
The focus of this task is to deliver Blender with a default brush library and a usable UI for the new tools as soon as possible, task focuses only on the UI related topics and not on how brush presets are stored, imported/exported and managed. The task for that is T70412.
Remove the Tool/Brush classification in the toolbar
Currently, brushes are classified in the toolbar organized by tools, some of these tools include multiple deformation types and modes inside them that can produce effects that are not related to the functionality of the tool, which are currently not directly accessible from the UI without modifying a preset.
Sculpt Mode should only have one Brush Tool in the toolbar. This tools should make accessible all the presets of a default brush library from a single place. In order to achieve this, what we currently have as sculpt tools in the code should be called deformers, stored in a deformer_type in the brush, and they should not be directly accessible from the toolbar UI. The user will directly select brush presets with the correctly preconfigured deformer when using the Brush Tool.
For advanced users, all the deformer type and options will still be available in the properties panel, so any brush preset can be created from any other one.
The experimental sculpt vertex paint brush will also include a paint_type which includes different tools that can apply colors to the mesh. This way, by adding a SCULPT_DEFORMER_NONE and SCULPT_PAINT_NONE it will be possible to create presets that paint, deform or both at the same time, supporting all kind of combinations.
Global Brush Palette and Brush Switching
Sculpting requires changing brushes way more often than painting, and the brush variety is also more extensive, so there needs to be a fast way to switch brush presets available in the UI after merging all sculpt tools into the Brush tool.
A global brush pallets will list all brushes in the brush library, that can be called from any place in the viewport when using the Brush Tool.
On top of this, there should be a way to add brush presets directly to the toolbar (or to a new UI element that can display brush presets icon over the viewport).
Having only a global brush palette without an asset manager can be problematic for fast brush switching, as the default Blender brush library will include a lot of presets for the new tools that are not relevant in most cases (like 30 cloth brushes that are only relevant when working with cloth sculpting assets).
With the asset manager, it should be possible to include as many brushes as we consider by default organized in folders and let append them to the brush palette when they need them.
Custom Topbar
The topbar should be the main way to tweak a brush in a controllable a safe way. Now it displays radius, strength and popovers with all brush properties, which some of them are not relevant when a particular deformer is enabled. For example, when using the cloth brush, texture options are not relevant and stroke options can break the intended behavior of the simulation.
Presets should be able to define a set or properties that are exposed in the topbar, with a particular design intention and use case in mind, and hide everything else.
For example, an preset called ¨Pose Inverse Kinematics¨ should display directly in the topbar the radius (used to control the bone size) the IK segments, the smooth iterations and if it should keep the anchor point. All these options can be safely used in any combination and make sense to tweak the behavior of that particular presets in a meaningful way, without exposing directly to the user all the options of the pose deformer.
There should be a way to add the properties to the topbar for users to create their own presets, probably a right click menu with a “expose in topbar” option should work.
Smooth And Invert Modes
Currently, there are quite some brush tools that have custom deformers for invert and smooth hardcoded in the tool code. (For example, the Face Set tools deforms the mesh smoothing the face sets boundaries when using shift, the pose brush changes the transform mode when pressing Ctrl). The brush swltching system should allow to remove this hardcoded configurations, but I'm still not sure how to do it. A possible option would be to allow users to define any other preset as the inverted and smooth modes of a brush and copy to this new preset all the properties exposed in the topbar when the mode is enabled, so both modes are in sync with the modified properties.
Plan of action
- Code refactor: Remove all ¨tool¨ references in the sculpt code, convert everything to deformers and organize them properly. For example, smooth and surface smooth are completely different deformers that don’t share any code, they can now be split for better organization).
- Remove the toolbar UI, create a single Brush Tool.
- Implement a global brush palette with a basic brush library. We can consider if including a full brush library by default is ok at this point.
- Implement the new Topbar UI with a custom UI per preset.