Page MenuHome

Sculpt: Support pen pressure modulation in Paint Brush properties
ClosedPublic

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

Details

Summary

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

Repository
rB Blender
Branch
svc-pen-pressure-1 (branched from master)
Build Status
Buildable 9044
Build 9044: arc lint + arc unit

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?

source/blender/editors/sculpt_paint/sculpt.c
6623

Make variable more local.

source/blender/makesrna/intern/rna_brush.c
2286

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

Same applies to the rest of this patch section.

2293

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.

source/blender/editors/sculpt_paint/sculpt_intern.h
831–835
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