diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-10-11 02:50:32 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-10-11 02:50:32 +0400 |
commit | 84f5a9a71834307e81f9386d911385e658d6d83d (patch) | |
tree | 1cbabce09fa1facf667d0a1e752a5e468ce352ff /source/blender/makesrna/intern/rna_linestyle.c | |
parent | d7cd6e349d01f6be60649a013c22330f0ba34c54 (diff) |
Added support for three types of stroke caps that determines the shape
of both ends of strokes. The three cap types are: 1) butt caps (flat);
2) round caps (half-circle); and 3) square caps (flat and extended).
Also implemented an option to join those feature edges of the same
object. These options are available in the "Stroke" tab of the
"Freestyle: Line Style" panel in the Render buttons.
Diffstat (limited to 'source/blender/makesrna/intern/rna_linestyle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 1aa7b71af2c..9867c1ed9c6 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -400,6 +400,11 @@ static void rna_def_linestyle(BlenderRNA *brna) {LS_PANEL_DISTORT, "DISTORT", 0, "Distort", "Show the panel for stroke distortion."}, {LS_PANEL_MISC, "MISC", 0, "Misc", "Show the panel for miscellaneous options."}, {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem cap_items[] = { + {LS_CAPS_BUTT, "BUTT", 0, "Butt", "Butt cap (flat)."}, + {LS_CAPS_ROUND, "ROUND", 0, "Round", "Round cap (half-circle)."}, + {LS_CAPS_SQUARE, "SQUARE", 0, "Square", "Square cap (flat and extended)."}, + {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "FreestyleLineStyle", "ID"); RNA_def_struct_ui_text(srna, "Freestyle Line Style", "Freestyle line style, reusable by multiple line sets"); @@ -444,6 +449,17 @@ static void rna_def_linestyle(BlenderRNA *brna) RNA_def_property_struct_type(prop, "LineStyleThicknessModifier"); RNA_def_property_ui_text(prop, "Thickness Modifiers", "List of line thickness modifiers."); + prop= RNA_def_property(srna, "same_object", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_SAME_OBJECT); + RNA_def_property_ui_text(prop, "Same Object", "if true, only feature edges of the same object are joined."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "caps", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "caps"); + RNA_def_property_enum_items(prop, cap_items); + RNA_def_property_ui_text(prop, "Cap", "Select the shape of both ends of strokes."); + RNA_def_property_update(prop, NC_SCENE, NULL); + } void RNA_def_linestyle(BlenderRNA *brna) |