[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43904] branches/soc-2008-mxcurioni: Unified "Ridge" and "Valley" into "Ridge & Valley" in the Parameter Editor mode.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Sun Feb 5 13:50:02 CET 2012
Revision: 43904
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43904
Author: kjym3
Date: 2012-02-05 12:50:01 +0000 (Sun, 05 Feb 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py 2012-02-05 11:42:20 UTC (rev 43903)
+++ branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py 2012-02-05 12:50:01 UTC (rev 43904)
@@ -969,12 +969,9 @@
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)
Modified: branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py 2012-02-05 11:42:20 UTC (rev 43903)
+++ branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py 2012-02-05 12:50:01 UTC (rev 43904)
@@ -316,8 +316,7 @@
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")
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp 2012-02-05 11:42:20 UTC (rev 43903)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp 2012-02-05 12:50:01 UTC (rev 43904)
@@ -275,8 +275,7 @@
{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 @@
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;
Modified: branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h 2012-02-05 11:42:20 UTC (rev 43903)
+++ branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h 2012-02-05 12:50:01 UTC (rev 43904)
@@ -47,7 +47,7 @@
#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 @@
#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
Modified: branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c 2012-02-05 11:42:20 UTC (rev 43903)
+++ branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c 2012-02-05 12:50:01 UTC (rev 43904)
@@ -2350,16 +2350,11 @@
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");
+ 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_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");
- RNA_def_property_update(prop, NC_SCENE, NULL);
-
prop= RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive contours");
@@ -2403,18 +2398,12 @@
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");
+ 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);
- 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");
- RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
-
prop= RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive contours");
More information about the Bf-blender-cvs
mailing list