Page MenuHome

Sculpt: Support pen pressure modulation in Paint Brush properties

Authored by Pablo Dobarro (pablodp606) on Jul 10 2020, 6:53 PM.



This allows to use pen pressure modulation in hardness, wet mix, wet
persistence, flow and density, as well as inverting the modulation (more
pressure, less density...). With this, it is possible to create brushes
that mix paint or apply a new color based on the pressure.

Diff Detail

rB Blender

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Jul 10 2020, 6:53 PM
Pablo Dobarro (pablodp606) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Jul 13 2020, 9:54 AM

@Campbell Barton (campbellbarton), mind having a second look at the RNA?


Make variable more local.


use_hardness_pressure, makes it closer to hardness in auto-completion.

Same applies to the rest of this patch section.


Don't use use_ prefix for invert.

The RNA is not very consistent in this, but this is very exceptional to see use_invert_foo, and the RNA cleaner considers invert a valid prefix.

Same applies to the rest of this patch section.

This revision now requires changes to proceed.Jul 13 2020, 9:54 AM
Pablo Dobarro (pablodp606) marked 3 inline comments as done.
  • Review Update: change RNA naming

Wrap the properties into a structure, to make access more explicit that it is for paint brush.
Other than that have nothing from my side.

struct {
  float hardness;
  float flow;
  float wet_mix;
  float wet_persistence;
  float density;
} paint_brush;
Pablo Dobarro (pablodp606) marked an inline comment as done.
  • Review update: use paint_brush struct
This revision is now accepted and ready to land.Jul 20 2020, 11:21 AM