Page MenuHome

Sculpt: Mask Init operator
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Mar 9 2021, 11:05 PM.

Details

Summary

This operator initializes mask values for the entire mesh. It supports
different modes for initializing those values, and more will be added in
the future.

The initial version supports generating a random mask per vertex, Face
Sets or loose parts. These masks are useful for introducing variations
in the model using the filters (both shapes and colors).

Random per Face Set and Mesh Filter:

Random per loose part and Color Filter:

Diff Detail

Repository
rB Blender
Branch
sculpt-mask-init (branched from master)
Build Status
Buildable 13389
Build 13389: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Mar 9 2021, 11:05 PM
Pablo Dobarro (pablodp606) created this revision.
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/editors/sculpt_paint/sculpt_mask_init.c
99

unnecessary newline

113

Would still appreciate it, if you could add that macro to the clang-format file: BKE_pbvh_vertex_iter_begin

162

I wonder if it would be good to expose the seed as parameter, and to randomize it on the call side, or only when it is not set explicitly. The main benefit would be reproducability, which could be important for scripts or tests. Anyway, it is probably not important right now, and can easily be added later when it becomes necessary.

This revision is now accepted and ready to land.Mar 11 2021, 4:46 PM
This revision was automatically updated to reflect the committed changes.
Pablo Dobarro (pablodp606) marked an inline comment as done.