diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-05 16:50:01 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-05 16:50:01 +0400 |
commit | b0d39d83b9cd4c1752684080b0c264d302d67154 (patch) | |
tree | fc6aa61a9080d81548ec77cf2d859973b07f7afb | |
parent | 29db9103e9c85356a057166be4f71c778cd97a45 (diff) |
Unified "Ridge" and "Valley" into "Ridge & Valley" in the Parameter Editor mode.
The Valley edge type is merely an alias of Ridge in the present Freestyle implementation.
5 files changed, 14 insertions, 31 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py index a4b349b751e..0a0e2553ac6 100644 --- a/release/scripts/freestyle/style_modules/parameter_editor.py +++ b/release/scripts/freestyle/style_modules/parameter_editor.py @@ -969,12 +969,9 @@ def process(layer_name, lineset_name): if lineset.select_crease: upred = pyNatureUP1D(Nature.CREASE) edge_type_criteria.append(NotUP1D(upred) if lineset.exclude_crease else upred) - if lineset.select_ridge: + if lineset.select_ridge_valley: upred = pyNatureUP1D(Nature.RIDGE) - edge_type_criteria.append(NotUP1D(upred) if lineset.exclude_ridge else upred) - if lineset.select_valley: - upred = pyNatureUP1D(Nature.VALLEY) - edge_type_criteria.append(NotUP1D(upred) if lineset.exclude_valley else upred) + edge_type_criteria.append(NotUP1D(upred) if lineset.exclude_ridge_valley else upred) if lineset.select_suggestive_contour: upred = pyNatureUP1D(Nature.SUGGESTIVE_CONTOUR) edge_type_criteria.append(NotUP1D(upred) if lineset.exclude_suggestive_contour else upred) diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 7f00689d254..873d010636d 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -316,8 +316,7 @@ class RENDER_PT_freestyle_lineset(RenderButtonsPanel, Panel): self.draw_edge_type_buttons(sub, lineset, "border") self.draw_edge_type_buttons(sub, lineset, "crease") - self.draw_edge_type_buttons(sub, lineset, "ridge") - self.draw_edge_type_buttons(sub, lineset, "valley") + self.draw_edge_type_buttons(sub, lineset, "ridge_valley") self.draw_edge_type_buttons(sub, lineset, "suggestive_contour") self.draw_edge_type_buttons(sub, lineset, "material_boundary") self.draw_edge_type_buttons(sub, lineset, "edge_mark") diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index d81e887be07..31dc8629f92 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -275,8 +275,7 @@ extern "C" { {FREESTYLE_FE_SILHOUETTE, 0}, {FREESTYLE_FE_BORDER, 0}, {FREESTYLE_FE_CREASE, 0}, - {FREESTYLE_FE_RIDGE, 0}, - {FREESTYLE_FE_VALLEY, 0}, + {FREESTYLE_FE_RIDGE_VALLEY, 0}, {FREESTYLE_FE_SUGGESTIVE_CONTOUR, 0}, {FREESTYLE_FE_MATERIAL_BOUNDARY, 0}, {FREESTYLE_FE_CONTOUR, 0}, @@ -315,8 +314,7 @@ extern "C" { conditions[i].value *= -1; logical_and = !logical_and; } - if (test_edge_type_conditions(conditions, num_edge_types, logical_and, FREESTYLE_FE_RIDGE, true) || - test_edge_type_conditions(conditions, num_edge_types, logical_and, FREESTYLE_FE_VALLEY, true)) + if (test_edge_type_conditions(conditions, num_edge_types, logical_and, FREESTYLE_FE_RIDGE_VALLEY, true)) ++use_ridges_and_valleys; if (test_edge_type_conditions(conditions, num_edge_types, logical_and, FREESTYLE_FE_SUGGESTIVE_CONTOUR, true)) ++use_suggestive_contours; diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index 9d56209f9f4..f6e9421fa34 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -47,7 +47,7 @@ struct FreestyleLineStyle; #define FREESTYLE_CONTROL_EDITOR_MODE 2 /* FreestyleLineSet::flags */ -#define FREESTYLE_LINESET_CURRENT 1 +#define FREESTYLE_LINESET_CURRENT 1l #define FREESTYLE_LINESET_ENABLED 2 #define FREESTYLE_LINESET_FE_NOT 4 #define FREESTYLE_LINESET_FE_AND 8 @@ -66,8 +66,8 @@ struct FreestyleLineStyle; #define FREESTYLE_FE_SILHOUETTE 1 #define FREESTYLE_FE_BORDER 2 #define FREESTYLE_FE_CREASE 4 -#define FREESTYLE_FE_RIDGE 8 -#define FREESTYLE_FE_VALLEY 16 +#define FREESTYLE_FE_RIDGE_VALLEY 8 +/* Note: FREESTYLE_FE_VALLEY = 16 is no longer used */ #define FREESTYLE_FE_SUGGESTIVE_CONTOUR 32 #define FREESTYLE_FE_MATERIAL_BOUNDARY 64 #define FREESTYLE_FE_CONTOUR 128 diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 1cb8de6eed5..8a52ccd5da8 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2350,14 +2350,9 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Crease", "Select crease edges"); RNA_def_property_update(prop, NC_SCENE, NULL); - prop= RNA_def_property(srna, "select_ridge", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE); - RNA_def_property_ui_text(prop, "Ridge", "Select ridges"); - RNA_def_property_update(prop, NC_SCENE, NULL); - - prop= RNA_def_property(srna, "select_valley", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_VALLEY); - RNA_def_property_ui_text(prop, "Valley", "Select valleys"); + prop= RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE_VALLEY); + RNA_def_property_ui_text(prop, "Ridge & Valley", "Select ridges and valleys"); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE); @@ -2403,15 +2398,9 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_X, 0); RNA_def_property_update(prop, NC_SCENE, NULL); - prop= RNA_def_property(srna, "exclude_ridge", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE); - RNA_def_property_ui_text(prop, "Ridge", "Exclude ridges"); - RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE, NULL); - - prop= RNA_def_property(srna, "exclude_valley", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_VALLEY); - RNA_def_property_ui_text(prop, "Valley", "Exclude valleys"); + prop= RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE_VALLEY); + RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and valleys"); RNA_def_property_ui_icon(prop, ICON_X, 0); RNA_def_property_update(prop, NC_SCENE, NULL); |