Refactor: Sculpt/Paint: Rename brush "tool" to "brush type" #126796
No reviewers
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#126796
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "JulianEisel/blender:temp-refactor-brush-tool-rename-brush-type"
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?
The term "tool" is historic from before the actual tool system got
introduced. Since then the term was already a bit confusing, because it
wasn't directly related to the tool system, but there was still some
relationship between the two. Now brushes and their types are decoupled
much more from the tool system, with a single "Brush" tool supporting
all kinds of brushes (draw, grab, cloth, smooth, ...).
For a more clear terminology, use "brush type" instead of "tool".
For #126032 we need to write the brush type to the asset metadata (done
in !124618), so we can filter brushes based on the type (so the grease
pencil eraser tool only shows eraser brushes, for example). I'd like to
use future proof names for that to avoid versioning of asset metadata in
future, so I'd rather do the full naming change now.
RNA properties (thus BPY names) are not changed for compatibility
reasons. Can be done in 5.0, see blender/blender#124201.
Brush.sculpt_tool
Brush.sculpt_brush_type
Brush.vertexpaint_tool
Brush.vertex_brush_type
Brush.weightpaint_tool
Brush.weight_brush_type
Brush.imagepaint_tool
Brush.image_brush_type
Brush.gpencil_tool
Brush.gpencil_brush_type
Brush.gpencil_vertex_tool
Brush.gpencil_vertex_brush_type
Brush.gpencil_sculpt_tool
Brush.gpencil_sculpt_brush_type
Brush.gpencil_weight_tool
Brush.gpencil_weight_brush_type
Brush.curves_sculpt_tool
Brush.curves_sculpt_brush_type
Refactor: Sculpt/Paint: Rename brush "tool" to brush "type"to Refactor: Sculpt/Paint: Rename brush "tool" to "brush type"On the C/C++ side it is a good change.
The RNA part I am not really happy with the current state of PR: other than a comment in C++ there is no way to know that some fields are deprecated.
If we go the route of "soft deprecation" there needs to be some sort of warning generated when you access the field (we had something similar for bgl module, AFAIR).
And, surely, it should be clearly reflected in the API documentation. Unless I'm missing something with the current PR the
sculpt_tool
andsculpt_brush_type
will have the same exact explanation, and people will be confused which one to use.I agree that we should not expose both old and new names as 'same thing' in the API and its documentation.
A quick hack could be to add accessors to the deprecated properties, generating some CLOG warnings e.g.
But I wonder if it would not be a good opportunity to actually add a nice way to handle RNA deprecation. Something like a new
RNA_def_property_deprecated(PropertyRNA *prop, StringRefNull message, uint3 removal_version)
function that would set a flag in the property definition, and store the expected removal version.Then:
Type.bl_rna.properties["deprecated_prop"]
), so API doc can either ignore them, and/or add proper deprecated info.makesrna
to:This is getting fairly out of scope for this PR, but at some point we do need to improve our deprecation handling.
Thanks Bastien.
For keeping things practical and moving forward, how do you both feel of limiting this PR to C/C++ side, and re-iterating on the Python side later, once deprecation mechanism is implemented?
For the deprecation warning I have some concerns (about implementation details, not the idea that we need to improve/implement it).
People working on scripts are surely more technical than users, but not technical enough to always pay attention to the terminal. On macOS it is not in a spirit to run applications from the terminals. And on Linux default .desktop shortcuts don't run Blender via terminal either. So ideally such warnings are somehow better be exposed to the UI.
On another hand, people who use scripts are not necessarily people maintaining them. For some more technical artists even console logs might become annoying about things they are not controlling. If the warning is done in the UI, then it becomes even more annoying for everyone.
Perhaps something like "warn once per deprecated property access" would be good default. And maybe enabling Developers Extra would default to "warn on every deprecated access".
For the
RNA_def_property_deprecated
we'd need to add some field that will explain what is to be used instead.Anyway, just some current thoughts. We probably move further discussion to a devtalk :)
@JulianEisel I think description needs to be updated, and there are also merge conflicts.
Is a big change, so only did a quick pass without checking line-by-line. What could possibly go wrong with the simple rename :)
@blender-bot build