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/makesdna
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/makesdna')
-rw-r--r--source/blender/makesdna/DNA_brush_enums.h4
-rw-r--r--source/blender/makesdna/DNA_scene_types.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h
index e0567151aa4..9b2dad915ed 100644
--- a/source/blender/makesdna/DNA_brush_enums.h
+++ b/source/blender/makesdna/DNA_brush_enums.h
@@ -338,6 +338,10 @@ typedef enum eAutomasking_flag {
BRUSH_AUTOMASKING_CAVITY_INVERTED = (1 << 5),
BRUSH_AUTOMASKING_CAVITY_ALL = (1 << 4) | (1 << 5),
BRUSH_AUTOMASKING_CAVITY_USE_CURVE = (1 << 6),
+ /* (1 << 7) - unused. */
+ BRUSH_AUTOMASKING_BRUSH_NORMAL = (1 << 8),
+ BRUSH_AUTOMASKING_VIEW_NORMAL = (1 << 9),
+ BRUSH_AUTOMASKING_VIEW_OCCLUSION = (1 << 10),
} eAutomasking_flag;
typedef enum ePaintBrush_flag {
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index cf163ab7019..80b1049ca23 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1025,6 +1025,9 @@ typedef struct Sculpt {
float automasking_cavity_factor;
char _pad[4];
+ float automasking_start_normal_limit, automasking_start_normal_falloff;
+ float automasking_view_normal_limit, automasking_view_normal_falloff;
+
struct CurveMapping *automasking_cavity_curve;
struct CurveMapping *automasking_cavity_curve_op; /* For use by operators */
struct Object *gravity_object;