Page MenuHome

Curves: Initial comb/shrink/grow brushes.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Mar 3 2022, 6:47 PM.
Tags
None
Tokens
"Like" token, awarded by hitrpr."Like" token, awarded by AlexeyAdamitsky."Love" token, awarded by eversimo."Love" token, awarded by Rusculleda."Love" token, awarded by dulrich."Like" token, awarded by CarbonSmasher.

Details

Summary

This adds initial versions of a comb, shrink and grow brush. Their exact behavior is still being iterated on.

Diff Detail

Repository
rB Blender
Branch
comb-brush (branched from master)
Build Status
Buildable 20871
Build 20871: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Mar 3 2022, 6:47 PM
Jacques Lucke (JacquesLucke) created this revision.
  • Merge branch 'master' into comb-brush
  • add grow/shrink brushes
Jacques Lucke (JacquesLucke) retitled this revision from Curves: Initial comb brush (WIP). to Curves: Initial comb/shrink/grow brushes (WIP)..Mar 4 2022, 3:15 PM
  • Merge branch 'master' into comb-brush
  • cleanup
  • support growing from zero length curves
  • fix brushes on transformed object
Jacques Lucke (JacquesLucke) retitled this revision from Curves: Initial comb/shrink/grow brushes (WIP). to Curves: Initial comb/shrink/grow brushes..Mar 7 2022, 12:47 PM
Jacques Lucke (JacquesLucke) edited the summary of this revision. (Show Details)

These tools are a great start!

Apart from the comment about splitting into a separate function (think that could be done in a few more places actually, though that could wait, if you preferred), I don't have many other comments.

In addition to iterating on behavior, it probably makes sense to look into other performance improvements too. I don't know where the bottlenecks are, but with 1 million+ curves, it gets pretty slow. Granted, that does mean quite a bit of points, but I expect/hope there's still room for improvement in some places.

source/blender/draw/intern/draw_cache_impl_curves.cc
343

This could be committed separately now, IMO, with a comment in the message mentioning this should all be rewritten anyway.

source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
338–371

I think this would be clearer if it was split to a separate function, named something like "move last point and resample". It would also be easier to change the implementation (which will certainly happen soon) without thinking about the brush.

That might be a good opportunity to share code with the shrink operation too, they look quite similar.

source/blender/editors/sculpt_paint/paint_stroke.c
1042

This could be committed separately too.

source/blender/makesrna/intern/rna_brush.c
247–251

Maybe it's time to give these proper names. They can still be prototypes, but it's a bit hard to use it when you have to first guess which operation is which.

This revision is now accepted and ready to land.Mar 7 2022, 10:35 PM
source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
338–371

I extracted a function but won't share the code for now. They are only superficially similar currently.

source/blender/makesrna/intern/rna_brush.c
247–251

yup, that what todays meeting will be about