Sculpt: Add dyntopo size edit support for BRUSH and RELATIVE modes #118403
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
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118403
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Sean-Kim/blender:108111-dynotopo-detail-size-edit"
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 PR adds support for the
SCULPT_OT_dyntopo_detail_size_edit
operator for theBrush Detail
andRelative Detail
modes, replacing the old generic radial menu.Changes
Limitations
Addresses #108111
The general behavior works exactly like expected. Well done! 👍
But on my Linux computer I ran into a bug with the grid.
To be fair, this has been an illusive bug that I wasn't able to consistently reproduce for years. I don't think there's an existing report.
Maybe this PR is causing this to persistently happen?
@Sean-Kim Did you encounter this issue in this PR?
@JulienKaspar - Didn't see this bug during my own testing of this. Can you get this to constantly happen on this mesh in a particular mode?
@Sean-Kim I can replicate it in all of the modes. I"ll try to avoid this bug and test it on Windows. I think it happens less there.
@blender-bot package
Package build started. Download here when ready.
Strange, aside from calculating the max edge length for each of the other modes, the drawing code was untouched - aside from some conditional logic and variable renames the constant / manual detail modes drawing logic should be identical to the prior commit. From the picture you attached it looks like every line segment is somehow sharing one of its points.
Ok I tested it via the buildbot and now the visual bug is gone... must be something with my build then.
Overall it works great but the Relative detail mode has a delay in updating the grid scale.
After resizing the brush with
F
, it shows the wrong grid scale onR
.After using the brush and pressing
R
again to show teh grid, it updated and now shows the correct grid scale.@ -501,0 +526,4 @@
}
else {
object_space_constant_detail = (cd->brush_radius / cd->pixel_radius) *
(cd->current_value * U.pixelsize) / 0.4f;
I would suggest that the magic numbers that are not obvious (/ 0.4f) should have a const meaningful name for future reference.
Good point, will do.
Found the commit that added it:
e659cfdaf7
- I suppose I'll change this to something likerelative_scale_factor
and update the other value insculpt.cc
in a subsequent commit along with some other deduplication to consolidate this logic.Some magic numbers will benefit from having const meaningful_names for future reference.
@JulienKaspar - the issue with relative scaling should be fixed now.
@blender-bot package
Package build started. Download here when ready.
Works exactly as expected now. Great work!
I did manage to reproduce the incorrect rendering, where triangle lines were all over the place, but it only happened once and I was not able to reproduce the issue since then.
There is some cosmetic change which would be nice to address to comply to the style guide. Maybe Sean Kim can address it, or Raul can ensure it is tackled before landing.
I don't think it worth having extra review iteration after that, so marking the patch as green.
@ -596,0 +631,4 @@
static void dyntopo_detail_size_bounds(DyntopoDetailSizeEditCustomData *cd)
{
// TODO: Get range from RNA for these values?
Style: We use C-style comments, even in C++ code:
/* ... */
@Sean-Kim Thanks for addressing the comment style.
@farsthary Can you take care of landing the feature and adding it to the release notes?