Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-09-29 09:21:56 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-09-29 09:21:56 +0300
commitbbc69563d0704a8269318d8699e7c2bf4edc91c2 (patch)
tree7d9d0aa1f35597442f633c3b2d88ff4d2df704d4 /source/blender/blenkernel/BKE_paint.h
parenta4ff106c5864343dd40cc945a5bdc74ed22d4274 (diff)
Sculpt: Normal-based automasking modes
Two new normal-based automasking modes. The first mode, "brush", compares vertex normals with the initial normal at the beginning of the brush stroke. The second, "view", compares vertex normals with the view normal. If "occlusion" is on then rays will be shot from each vertex to test if it is occluded by other geometry (note: this can be very slow).\ Only geometry inside the sculpt mesh is considered. Each mode has an associated angular limit and a falloff. Reviewed by: Julien Kaspar and Jeroen Bakker Differential Revision: https://developer.blender.org/D15297 Ref D15297
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r--source/blender/blenkernel/BKE_paint.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 386fecfd278..ed7ef5d5efd 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -474,11 +474,6 @@ typedef struct SculptBoundary {
} twist;
} SculptBoundary;
-typedef struct CavityMaskData {
- float factor;
- int stroke_id;
-} CavityMaskData;
-
typedef struct SculptFakeNeighbors {
bool use_fake_neighbors;
@@ -554,13 +549,13 @@ typedef struct SculptAttributePointers {
/* Precomputed auto-mask factor indexed by vertex, owned by the auto-masking system and
* initialized in #SCULPT_automasking_cache_init when needed. */
SculptAttribute *automasking_factor;
+ SculptAttribute *automasking_occlusion; /* CD_PROP_INT8. */
+ SculptAttribute *automasking_stroke_id;
+ SculptAttribute *automasking_cavity;
/* BMesh */
SculptAttribute *dyntopo_node_id_vertex;
SculptAttribute *dyntopo_node_id_face;
-
- SculptAttribute *stroke_id;
- SculptAttribute *cavity;
} SculptAttributePointers;
typedef struct SculptSession {
@@ -747,14 +742,16 @@ typedef struct SculptSession {
*/
bool sticky_shading_color;
+ uchar stroke_id;
+
/**
* Last used painting canvas key.
*/
char *last_paint_canvas_key;
+ float last_normal[3];
- uchar stroke_id;
int last_automasking_settings_hash;
- uchar last_cavity_stroke_id;
+ uchar last_automask_stroke_id;
} SculptSession;
void BKE_sculptsession_free(struct Object *ob);