[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30007] branches/soc-2008-mxcurioni: Added UI controls for specifying logical operations (logical AND, OR,
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Tue Jul 6 00:32:51 CEST 2010
Revision: 30007
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30007
Author: kjym3
Date: 2010-07-06 00:32:51 +0200 (Tue, 06 Jul 2010)
Log Message:
-----------
Added UI controls for specifying logical operations (logical AND, OR,
and NOT) to combine feature edge selection criteria.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
Property Changed:
----------------
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
Modified: branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py 2010-07-05 22:22:22 UTC (rev 30006)
+++ branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py 2010-07-05 22:32:51 UTC (rev 30007)
@@ -222,6 +222,11 @@
col.prop(lineset, "name")
row = col.row()
+ row.prop(lineset, "selection_negation", expand=True)
+ row = col.row()
+ row.prop(lineset, "selection_combination", expand=True)
+
+ row = col.row()
sub = row.column()
sub.prop(lineset, "select_silhouette")
sub.prop(lineset, "select_border")
Modified: branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h 2010-07-05 22:22:22 UTC (rev 30006)
+++ branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h 2010-07-05 22:32:51 UTC (rev 30007)
@@ -16,6 +16,8 @@
/* FreestyleLineSet::flags */
#define FREESTYLE_LINESET_CURRENT 1
#define FREESTYLE_LINESET_ENABLED 2
+#define FREESTYLE_LINESET_SEL_NOT 4
+#define FREESTYLE_LINESET_SEL_OR 8
/* FreestyleLineSet::selection */
#define FREESTYLE_SEL_SILHOUETTE 1
Property changes on: branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c 2010-07-05 22:22:22 UTC (rev 30006)
+++ branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c 2010-07-05 22:32:51 UTC (rev 30007)
@@ -1535,6 +1535,16 @@
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem selection_negation_items[] = {
+ {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given selection criteria."},
+ {FREESTYLE_LINESET_SEL_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not satisfying the given selection criteria."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem selection_combination_items[] = {
+ {0, "AND", 0, "Logical AND", "Combine selection criteria by logical AND (logical conjunction)."},
+ {FREESTYLE_LINESET_SEL_OR, "OR", 0, "Logical OR", "Combine selection criteria by logical OR (logical disjunction)."},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem freestyle_ui_mode_items[] = {
{FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode", "Advanced mode for using style modules in Python"},
{FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode", "Basic mode for interactive style parameter editing"},
@@ -1571,6 +1581,18 @@
RNA_def_property_ui_text(prop, "Enabled", "Enable or disable the line set.");
RNA_def_property_update(prop, NC_SCENE, NULL);
+ prop= RNA_def_property(srna, "selection_negation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
+ RNA_def_property_enum_items(prop, selection_negation_items);
+ RNA_def_property_ui_text(prop, "Selection Negation", "Set the negation operation for selection criteria.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "selection_combination", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
+ RNA_def_property_enum_items(prop, selection_combination_items);
+ RNA_def_property_ui_text(prop, "Selection Combination", "Set the combination operation for selection criteria.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "objects", NULL);
RNA_def_property_struct_type(prop, "Object");
More information about the Bf-blender-cvs
mailing list