diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-09-20 02:40:44 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-09-20 02:40:44 +0400 |
commit | 38f24637d49f6d8742883d50fbae4738de56cd4c (patch) | |
tree | 2130195835b7ace773664538006364c21774b675 /source/blender/makesrna/intern/rna_linestyle.c | |
parent | 513293a2566016f6e2f1aba00f73910d14e71780 (diff) |
Added new line style options for sketchy chaining of feature edges.
The default chaining option is now called "Natural", while the new chaining options
are "Sketchy: Topology Preserved" and "Sketchy: Topology broken". The latter two
options allow for generating chains of feature edges with a sketchy multiple touch.
The "Sketchy: Topology Preserved" option takes account of the topology of objects
in the view map, while the "Sketchy: Topology broken" ignores the edge topology.
The "rounds" option specifies the number of rounds in sketchy strokes.
Diffstat (limited to 'source/blender/makesrna/intern/rna_linestyle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 389d3746671..415379b39d1 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -674,6 +674,11 @@ static void rna_def_linestyle(BlenderRNA *brna) {LS_PANEL_GEOMETRY, "GEOMETRY", 0, "Geometry", "Show the panel for stroke geometry options."}, {LS_PANEL_MISC, "MISC", 0, "Misc", "Show the panel for miscellaneous options."}, {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem chaining_items[] = { + {LS_CHAINING_NATURAL, "NATURAL", 0, "Natural", "Natural chaining."}, + {LS_CHAINING_SKETCHY_TOPOLOGY_PRESERVED, "SKETCHY_TOPOLOGY_PRESERVED", 0, "Sketchy: Topology Preserved", "Natural chaining with a sketchy multiple touch."}, + {LS_CHAINING_SKETCHY_TOPOLOGY_BROKEN, "SKETCHY_TOPOLOGY_BROKEN", 0, "Sketchy: Topology Broken", "Sketchy chaining with a broken topology of objects."}, + {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)."}, @@ -723,6 +728,18 @@ 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, "chaining", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "chaining"); + RNA_def_property_enum_items(prop, chaining_items); + RNA_def_property_ui_text(prop, "Chaining", "Select the way how feature edges are jointed to form chains."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "rounds", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "rounds"); + RNA_def_property_range(prop, 1, 1000); + RNA_def_property_ui_text(prop, "Rounds", "Number of rounds in a sketch multiple touch."); + RNA_def_property_update(prop, NC_SCENE, NULL); + prop= RNA_def_property(srna, "geometry_modifiers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "geometry_modifiers", NULL); RNA_def_property_struct_type(prop, "LineStyleGeometryModifier"); |