Page MenuHome

Sculpt: Option to limit the action of line gestures to the segment
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Oct 21 2020, 10:46 PM.
Tags
None
Tokens
"100" token, awarded by Regnas."Love" token, awarded by lopoIsaac."Love" token, awarded by tux21b."Love" token, awarded by Tonatiuh."Love" token, awarded by sick.

Details

Summary

This adds a tool property for sculpt line gesture tools (line and
project) to limits its effect to the segment of the gesture instead of
using the infinite line to bisect the mesh in two parts.

To achieve that, the line gesture now has two extra side planes that can
be enabled/disabled for getting the nodes from the PBVH and to test the
vertices.

Diff Detail

Repository
rB Blender
Branch
sculpt-limit-to-segment (branched from master)
Build Status
Buildable 10863
Build 10863: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Oct 21 2020, 10:46 PM
Pablo Dobarro (pablodp606) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Oct 22 2020, 10:45 AM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/sculpt_paint/paint_mask.c
251–252

Add a comment explaining what those are and what the difference is.

328

Convention is to use use_ prefix for booleans.

520–524

You have a repetitive normal_tri_v3 + if() + plane_from_point_normal_v3(). It can totally be moved to a function, reducing boiler plate code here.

You should also consider splitting the sculpt_gesture_init_from_line up, because there are 4 different non-trivial steps involved.

Basically, always keep vertical size small as possible, keep function to do one thing.

This revision now requires changes to proceed.Oct 22 2020, 10:45 AM
Pablo Dobarro (pablodp606) marked 2 inline comments as done.
Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)
  • review update

Generally fine. If the true_ prefix follows the same semantic as normal for symmetry you can go ahead and commit. Otherwise some clarification will be helpful.

source/blender/editors/sculpt_paint/paint_mask.c
251–252

Is the true_ prefix has same meaning as location/normal for symmetry passes?

This revision is now accepted and ready to land.Oct 23 2020, 12:32 PM

IMHO this functionality should be the default.