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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-27 13:44:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-27 13:44:56 +0400
commit13254cde8c7ca38af2dcec35efdb9f8f9b3bca46 (patch)
treea6d62e3b3948af458b5a8913293412393a540a96 /source/blender/makesrna
parent4035bf16e75acde1ef77d8a176edc95dbad70f35 (diff)
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_mask.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index a6571a2db4f..719baed8edb 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -540,6 +540,12 @@ static void rna_def_maskSpline(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem spline_offset_mode_items[] = {
+ {MASK_SPLINE_OFFSET_EVEN, "EVEN", 0, "Even", "Calculate even feather offset"},
+ {MASK_SPLINE_OFFSET_SMOOTH, "SMOOTH", 0, "Smooth", "Calculate feather offset as a second curve"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
StructRNA *srna;
PropertyRNA *prop;
@@ -548,6 +554,13 @@ static void rna_def_maskSpline(BlenderRNA *brna)
srna = RNA_def_struct(brna, "MaskSpline", NULL);
RNA_def_struct_ui_text(srna, "Mask spline", "Single spline used for defining mask shape");
+ /* offset mode */
+ prop = RNA_def_property(srna, "offset_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "offset_mode");
+ RNA_def_property_enum_items(prop, spline_offset_mode_items);
+ RNA_def_property_ui_text(prop, "Feather Offset", "The method used for calculating the feather offset");
+ RNA_def_property_update(prop, 0, "rna_Mask_update_data");
+
/* weight interpolation */
prop = RNA_def_property(srna, "weight_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "weight_interp");