diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-25 07:14:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-25 07:55:16 +0300 |
commit | a323d8edbfde8140e364df28194bc9e08eb45354 (patch) | |
tree | 1f65d552b80d299ad13164f896dde5c1ab31f4b1 /source/blender/makesrna | |
parent | 2418daede5913c54bd9675eb23624487f6b0ad4c (diff) |
Curve Drawing: Add option to use new refit method
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index b1048f72022..7ae3d552916 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -52,6 +52,7 @@ extern EnumPropertyItem rna_enum_proportional_editing_items[]; extern EnumPropertyItem rna_enum_snap_target_items[]; extern EnumPropertyItem rna_enum_snap_element_items[]; extern EnumPropertyItem rna_enum_snap_node_element_items[]; +extern EnumPropertyItem rna_enum_curve_fit_method_items[]; extern EnumPropertyItem rna_enum_mesh_select_mode_items[]; extern EnumPropertyItem rna_enum_mesh_delimit_mode_items[]; extern EnumPropertyItem rna_enum_space_type_items[]; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d1f8c4e5bed..ed90f146f4d 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -178,6 +178,11 @@ EnumPropertyItem snap_uv_element_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem rna_enum_curve_fit_method_items[] = { + {CURVE_PAINT_FIT_METHOD_REFIT, "REFIT", 0, "Refit", "Incrementally re-fit the curve (high quality)"}, + {CURVE_PAINT_FIT_METHOD_SPLIT, "SPLIT", 0, "Split", "Split the curve until the tolerance is met (fast)"}, + {0, NULL, 0, NULL, NULL}}; + /* workaround for duplicate enums, * have each enum line as a define then conditionally set it or not */ @@ -2638,6 +2643,11 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) RNA_def_property_range(prop, 1, 100); RNA_def_property_ui_text(prop, "Tolerance", "Allow deviation for a smoother, less precise line"); + prop = RNA_def_property(srna, "fit_method", PROP_ENUM, PROP_PIXEL); + RNA_def_property_enum_sdna(prop, NULL, "fit_method"); + RNA_def_property_enum_items(prop, rna_enum_curve_fit_method_items); + RNA_def_property_ui_text(prop, "Method", "Curve fitting method"); + prop = RNA_def_property(srna, "corner_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_range(prop, 0, M_PI); RNA_def_property_ui_text(prop, "Corner Angle", "Angles above this are considered corners"); |