From 13254cde8c7ca38af2dcec35efdb9f8f9b3bca46 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Aug 2012 09:44:56 +0000 Subject: Alternate mask spline feather offset calculation method: now there are 2 [Even | Smooth] - Even preserves thickness but can give unsightly loops - Smooth gives nicer shape but can give unsightly feather/spline mismatch for 'S' shapes created by beziers. This is an example where smooth works much nicer. http://www.graphicall.org/ftp/ideasman42/mask_compare.png --- source/blender/makesdna/DNA_mask_types.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'source/blender/makesdna/DNA_mask_types.h') diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h index 6c7f7aa2471..bf388d8c018 100644 --- a/source/blender/makesdna/DNA_mask_types.h +++ b/source/blender/makesdna/DNA_mask_types.h @@ -82,13 +82,14 @@ typedef struct MaskSplinePoint { typedef struct MaskSpline { struct MaskSpline *next, *prev; - int flag; /* defferent spline flag (closed, ...) */ + short flag; /* defferent spline flag (closed, ...) */ + char offset_mode; /* feather offset method */ + char weight_interp; /* weight interpolation */ + int tot_point; /* total number of points */ MaskSplinePoint *points; /* points which defines spline itself */ MaskParent parent; /* parenting information of the whole spline */ - int weight_interp, pad; /* weight interpolation */ - MaskSplinePoint *points_deform; /* deformed copy of 'points' BezTriple data - not saved */ } MaskSpline; @@ -146,8 +147,17 @@ enum { }; /* MaskSpline->weight_interp */ -#define MASK_SPLINE_INTERP_LINEAR 1 -#define MASK_SPLINE_INTERP_EASE 2 +enum { + MASK_SPLINE_INTERP_LINEAR = 1, + MASK_SPLINE_INTERP_EASE = 2 +}; + +/* MaskSpline->offset_mode */ +enum { + MASK_SPLINE_OFFSET_EVEN = 0, + MASK_SPLINE_OFFSET_SMOOTH = 1 +}; + /* ob->restrictflag */ #define MASK_RESTRICT_VIEW 1 -- cgit v1.2.3