diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-11-01 13:47:41 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-11-01 13:47:41 +0400 |
commit | ac6bdfb653fc8b4566179d3481ed89192106ceef (patch) | |
tree | 1d66cc8afe88b640a5f6421a8a789e19a7270902 /source/blender/makesrna/intern/rna_linestyle.c | |
parent | 12f2c06d344e61e4cd104aa25e5f6ab3b72446d0 (diff) |
Added two stroke geometry modifiers: Parameterization and Guiding Lines.
Diffstat (limited to 'source/blender/makesrna/intern/rna_linestyle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 5b3a2550921..6b278af9a06 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -67,6 +67,8 @@ EnumPropertyItem linestyle_geometry_modifier_type_items[] ={ {LS_MODIFIER_PERLIN_NOISE_2D, "PERLIN_NOISE_2D", ICON_MODIFIER, "Perlin Noise 2D", ""}, {LS_MODIFIER_BACKBONE_STRETCHER, "BACKBONE_STRETCHER", ICON_MODIFIER, "Backbone Stretcher", ""}, {LS_MODIFIER_TIP_REMOVER, "TIP_REMOVER", ICON_MODIFIER, "Tip Remover", ""}, + {LS_MODIFIER_POLYGONIZATION, "POLYGONIZATION", ICON_MODIFIER, "Polygonization", ""}, + {LS_MODIFIER_GUIDING_LINES, "GUIDING_LINES", ICON_MODIFIER, "Guiding Lines", ""}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -148,6 +150,10 @@ static StructRNA *rna_LineStyle_geometry_modifier_refine(struct PointerRNA *ptr) return &RNA_LineStyleGeometryModifier_BackboneStretcher; case LS_MODIFIER_TIP_REMOVER: return &RNA_LineStyleGeometryModifier_TipRemover; + case LS_MODIFIER_POLYGONIZATION: + return &RNA_LineStyleGeometryModifier_Polygonalization; + case LS_MODIFIER_GUIDING_LINES: + return &RNA_LineStyleGeometryModifier_GuidingLines; default: return &RNA_LineStyleGeometryModifier; } @@ -659,6 +665,24 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Tip Length", "Length of tips to be removed"); RNA_def_property_update(prop, NC_SCENE, NULL); + srna= RNA_def_struct(brna, "LineStyleGeometryModifier_Polygonalization", "LineStyleGeometryModifier"); + RNA_def_struct_ui_text(srna, "Polygonalization", "Modify the stroke geometry so that it looks more \"polygonal\""); + rna_def_geometry_modifier(srna); + + prop= RNA_def_property(srna, "error", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "error"); + RNA_def_property_ui_text(prop, "Error", "Maximum distance between the original stroke and its polygonal approximation"); + RNA_def_property_update(prop, NC_SCENE, NULL); + + srna= RNA_def_struct(brna, "LineStyleGeometryModifier_GuidingLines", "LineStyleGeometryModifier"); + RNA_def_struct_ui_text(srna, "Guiding Lines", "Modify the stroke geometry so that it corresponds to its main direction line"); + rna_def_geometry_modifier(srna); + + prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "offset"); + RNA_def_property_ui_text(prop, "Offset", "Displacement that is applied to the main direction line along its normal"); + RNA_def_property_update(prop, NC_SCENE, NULL); + } static void rna_def_linestyle(BlenderRNA *brna) |