From d8509b349d1d6219923615e7af81267bb6f06b68 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Oct 2017 00:18:11 +1100 Subject: Sculpt Mode: 2D falloff option This makes brush influence into a tube instead of a sphere. It can be used along the outline of a mesh to adjust it's silhouette. Note that all this takes advantage of changes from vertex paint, from testing this seems useful so exposing from the brush options. --- source/blender/makesdna/DNA_brush_types.h | 13 +++++++++++-- source/blender/makesdna/DNA_scene_types.h | 9 ++------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 67a35d4e207..6f239ec558b 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -95,8 +95,11 @@ typedef struct Brush { float plane_offset; /* offset for plane brushes (clay, flatten, fill, scrape) */ int gradient_spacing; - int gradient_stroke_mode; /* source for stroke color gradient application */ - int gradient_fill_mode; /* source for fill tool color gradient application */ + char gradient_stroke_mode; /* source for stroke color gradient application */ + char gradient_fill_mode; /* source for fill tool color gradient application */ + + char falloff_shape; /* Projection shape (sphere, circle) */ + char pad[5]; char sculpt_tool; /* active sculpt tool */ char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */ @@ -343,6 +346,12 @@ typedef enum BlurKernelType { KERNEL_BOX } BlurKernelType; +/* Brush.falloff_shape */ +enum { + PAINT_FALLOFF_SHAPE_SPHERE = 0, + PAINT_FALLOFF_SHAPE_TUBE = 1, +}; + #define MAX_BRUSH_PIXEL_RADIUS 500 #endif /* __DNA_BRUSH_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 89a8a410f3e..830c584529c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1118,7 +1118,8 @@ typedef struct UvSculpt { typedef struct VPaint { Paint paint; short flag; - char falloff_shape, normal_angle; + char normal_angle; + char pad; int radial_symm[3]; /* For mirrored painting */ } VPaint; @@ -1132,12 +1133,6 @@ enum { VP_FLAG_VGROUP_RESTRICT = (1 << 7) }; -/* VPaint.falloff_shape */ -enum { - VP_FALLOFF_SHAPE_SPHERE = 0, - VP_FALLOFF_SHAPE_TUBE = 1, -}; - /* ------------------------------------------- */ /* GPencil Stroke Sculpting */ -- cgit v1.2.3