[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41286] branches/soc-2008-mxcurioni: New option for disabling the chaining of feature edges in the Parameter Editor mode .
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Wed Oct 26 01:24:59 CEST 2011
Revision: 41286
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41286
Author: kjym3
Date: 2011-10-25 23:24:59 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
New option for disabling the chaining of feature edges in the Parameter Editor mode.
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/makesdna/DNA_linestyle_types.h
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.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 2011-10-25 19:06:53 UTC (rev 41285)
+++ branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py 2011-10-25 23:24:59 UTC (rev 41286)
@@ -919,16 +919,17 @@
upred = TrueUP1D()
Operators.select(upred)
# join feature edges to form chains
- if linestyle.chaining == "PLAIN":
- if linestyle.same_object:
- Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
- else:
- Operators.bidirectionalChain(ChainPredicateIterator(upred, TrueBP1D()), NotUP1D(upred))
- elif linestyle.chaining == "SKETCHY":
- if linestyle.same_object:
- Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(linestyle.rounds))
- else:
- Operators.bidirectionalChain(pySketchyChainingIterator(linestyle.rounds))
+ if linestyle.use_chaining:
+ if linestyle.chaining == "PLAIN":
+ if linestyle.same_object:
+ Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+ else:
+ Operators.bidirectionalChain(ChainPredicateIterator(upred, TrueBP1D()), NotUP1D(upred))
+ elif linestyle.chaining == "SKETCHY":
+ if linestyle.same_object:
+ Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(linestyle.rounds))
+ else:
+ Operators.bidirectionalChain(pySketchyChainingIterator(linestyle.rounds))
# split chains
if linestyle.material_boundary:
Operators.sequentialSplit(MaterialBoundaryUP0D())
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 2011-10-25 19:06:53 UTC (rev 41285)
+++ branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py 2011-10-25 23:24:59 UTC (rev 41286)
@@ -546,14 +546,16 @@
if linestyle.panel == "STROKES":
# Chaining
col = layout.column()
- col.label(text="Chaining:")
- col.prop(linestyle, "chaining", text="")
+ col.prop(linestyle, "use_chaining", text="Chaining:")
+ sub = col.column()
+ sub.enabled = linestyle.use_chaining
+ sub.prop(linestyle, "chaining", text="")
if linestyle.chaining == "PLAIN":
- col.prop(linestyle, "same_object")
+ sub.prop(linestyle, "same_object")
elif linestyle.chaining == "SKETCHY":
- sub = col.row()
- sub.prop(linestyle, "same_object")
- sub.prop(linestyle, "rounds")
+ subsub = sub.row()
+ subsub.prop(linestyle, "same_object")
+ subsub.prop(linestyle, "rounds")
# Splitting
col = layout.column()
col.label(text="Splitting:")
Modified: branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_linestyle_types.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_linestyle_types.h 2011-10-25 19:06:53 UTC (rev 41285)
+++ branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_linestyle_types.h 2011-10-25 23:24:59 UTC (rev 41286)
@@ -321,6 +321,7 @@
#define LS_MATERIAL_BOUNDARY 8
#define LS_MIN_2D_LENGTH 16
#define LS_MAX_2D_LENGTH 32
+#define LS_NO_CHAINING 64
/* FreestyleLineStyle::chaining */
#define LS_CHAINING_PLAIN 1
Modified: branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c 2011-10-25 19:06:53 UTC (rev 41285)
+++ branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c 2011-10-25 23:24:59 UTC (rev 41286)
@@ -727,6 +727,11 @@
RNA_def_property_struct_type(prop, "LineStyleThicknessModifier");
RNA_def_property_ui_text(prop, "Thickness Modifiers", "List of line thickness modifiers.");
+ prop= RNA_def_property(srna, "use_chaining", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", LS_NO_CHAINING);
+ RNA_def_property_ui_text(prop, "Chaining", "Enable chaining of feature edges.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
prop= RNA_def_property(srna, "chaining", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "chaining");
RNA_def_property_enum_items(prop, chaining_items);
More information about the Bf-blender-cvs
mailing list