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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user