Sculpt: Add brush settings for view & normal automasking values #117433
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
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
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 project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117433
Loading…
Reference in New Issue
No description provided.
Delete Branch "Sean-Kim/blender:115174-automask-limit-falloff"
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?
This pull request adds the ability for the
Limit
andFalloff
values for the View and Normal automask modes to be applied per-brush instead of modifying the global tool value.Previously, while the flag settings were stored at the brush and global level, the values would always change the global value even when using the advanced tab of the brush menu.
Testing
make test
results in 3 failures (49 - io_wavefront, 134 - compositor_distort_cpu, 323 - imbuf_save), but these tests appear to fail even prior to any changes being applied when running locallyAddresses #115174
I have no opinion about scene vs. brush values being better than one another. If Julien prefers this, I'm happy to go with it. Thanks for the PR. Just a couple comments inline.
@ -827,1 +827,4 @@
}
{
const Brush *default_brush = DNA_struct_default_get(Brush);
I would have expected
startup.blend
is versioned byblo_do_versions_400
, maybe I'm wrong though. Did you check that this was necessary?According to the comment at the top of the file &
dna_defaults.c
this is where thestartup.blend
updating happens, not sure whyblo_do_versions_400
doesn't apply to it, but when I've done manual testing before for other issues the value wasn't updated for new files unless I made these corresponding changes.@ -93,2 +93,4 @@
.pose_ik_segments = 1, \
.hardness = 0.0f, \
\
/* automasking */ \
This
automasking
comment is unnecessary IMO, all the next settings start with that word anyway@ -95,1 +97,4 @@
.automasking_boundary_edges_propagation_steps = 1, \
.automasking_start_normal_limit = 0.34906585f, /* 20 / 180 * pi. */ \
.automasking_start_normal_falloff = 0.25f, \
.automasking_view_normal_limit = 1.570796, /* 0.5 * pi. */ \
For the comments, how about writing these values in degrees?
Agreed, left it like this originally to make it match the value in
DNA_scene_defaults.h
, but degrees makes more sense as a comment.@ -317,6 +317,9 @@ typedef struct Brush {
int automasking_flags;
int automasking_boundary_edges_propagation_steps;
float automasking_start_normal_limit, automasking_start_normal_falloff;
These days each value is typically declared on its own line. Just easier to read that way.
Do we expect the automasking to behave similar to other unified settings of the brushes?
If yes, then it seems something is missing in the UI and in the
cache_settings_update
to choose either of those settings.If no, we should not have unaccessible Sculpt-level properties for those values, including
rna_def_sculpt()
, andSculpt
.On the user side this fixes the issue. Thanks for the PR!
Sean pointer out in the chat that the setting is actually exposed in the Auto-Smooth pop-over. To me the current UI quite confusing, as it is not clear what the relation between global sculpt and brush settings is. However, it is something that was there already, with the cavity auto-masking behavior.
Would be very nice to work on this, but it is not for the scope of this patch.
If Julien is happy with the current state of the PR lets land it. The code seems fine.