diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-12-12 03:41:15 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-12-12 03:41:15 +0400 |
commit | 32db495e501e8d36718f50b79bbebad4dbb67d33 (patch) | |
tree | 10cbb93885cf4e62f2138cce81dff943c6af8edf /source/blender | |
parent | 8a182d41b18b739c8b03c2961a2e79ca6d83049c (diff) |
Updates on the Parameter Editor mode:
* Added a new chain splitting option for dividing chains into pieces having
a given curvilinear 2D length.
* Rearranged the UI controls of chain splitting options according to the
actual order of processing.
* Made changes for converting each view edge into a chain in the case of
not using chaining.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/linestyle.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_linestyle_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 15 |
3 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index a16135e521f..3afdef79231 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -79,6 +79,7 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle) linestyle->max_angle = 0.0f; linestyle->min_length = 0.0f; linestyle->max_length = 10000.0f; + linestyle->split_length = 100; linestyle->color_modifiers.first = linestyle->color_modifiers.last = NULL; linestyle->alpha_modifiers.first = linestyle->alpha_modifiers.last = NULL; @@ -140,6 +141,7 @@ FreestyleLineStyle *FRS_copy_linestyle(FreestyleLineStyle *linestyle) new_linestyle->max_angle = linestyle->max_angle; new_linestyle->min_length = linestyle->min_length; new_linestyle->max_length = linestyle->max_length; + new_linestyle->split_length = linestyle->split_length; new_linestyle->dash1 = linestyle->dash1; new_linestyle->gap1 = linestyle->gap1; new_linestyle->dash2 = linestyle->dash2; diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h index aa28ecac77d..4ae3183e454 100644 --- a/source/blender/makesdna/DNA_linestyle_types.h +++ b/source/blender/makesdna/DNA_linestyle_types.h @@ -360,6 +360,7 @@ typedef struct LineStyleThicknessModifier_Calligraphy { #define LS_NO_CHAINING 64 #define LS_MIN_2D_ANGLE 128 #define LS_MAX_2D_ANGLE 256 +#define LS_SPLIT_LENGTH 512 /* FreestyleLineStyle::chaining */ #define LS_CHAINING_PLAIN 1 @@ -379,11 +380,11 @@ typedef struct FreestyleLineStyle { int flag, caps; int chaining; unsigned int rounds; + float split_length; float min_angle, max_angle; /* for splitting */ float min_length, max_length; unsigned short dash1, gap1, dash2, gap2, dash3, gap3; int panel; /* for UI */ - int pad1; ListBase color_modifiers; ListBase alpha_modifiers; diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 407566ea09c..62287f2c882 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -823,6 +823,17 @@ static void rna_def_linestyle(BlenderRNA *brna) 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, "use_split_length", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_SPLIT_LENGTH); + RNA_def_property_ui_text(prop, "Use Split Length", "Enable chain splitting by curvilinear 2D length"); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "split_length", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "split_length"); + RNA_def_property_range(prop, 0.0f, 10000.0f); + RNA_def_property_ui_text(prop, "Split Length", "Curvilinear 2D length for chain splitting"); + RNA_def_property_update(prop, NC_SCENE, NULL); + prop= RNA_def_property(srna, "use_min_angle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_MIN_2D_ANGLE); RNA_def_property_ui_text(prop, "Use Min 2D Angle", "Split chains at points with angles smaller than the minimum 2D angle"); @@ -853,7 +864,7 @@ static void rna_def_linestyle(BlenderRNA *brna) prop= RNA_def_property(srna, "min_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "min_length"); RNA_def_property_range(prop, 0.0f, 10000.0f); - RNA_def_property_ui_text(prop, "Min 2D Length", "Minimum 2D length for the selection of chains"); + RNA_def_property_ui_text(prop, "Min 2D Length", "Minimum curvilinear 2D length for the selection of chains"); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "use_max_length", PROP_BOOLEAN, PROP_NONE); @@ -864,7 +875,7 @@ static void rna_def_linestyle(BlenderRNA *brna) prop= RNA_def_property(srna, "max_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "max_length"); RNA_def_property_range(prop, 0.0f, 10000.0f); - RNA_def_property_ui_text(prop, "Max 2D Length", "Maximum 2D length for the selection of chains"); + RNA_def_property_ui_text(prop, "Max 2D Length", "Maximum curvilinear 2D length for the selection of chains"); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "material_boundary", PROP_BOOLEAN, PROP_NONE); |