Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/freestyle/style_modules/parameter_editor.py21
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py14
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c5
4 files changed, 25 insertions, 16 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
index 80ac350a39a..0c4987aabb8 100644
--- a/release/scripts/freestyle/style_modules/parameter_editor.py
+++ b/release/scripts/freestyle/style_modules/parameter_editor.py
@@ -919,16 +919,17 @@ def process(layer_name, lineset_name):
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())
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index dc78e8904bd..04d3ecb120f 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -546,14 +546,16 @@ class RENDER_PT_freestyle_linestyle(RenderButtonsPanel, Panel):
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")
- elif linestyle.chaining == "SKETCHY":
- sub = col.row()
sub.prop(linestyle, "same_object")
- sub.prop(linestyle, "rounds")
+ elif linestyle.chaining == "SKETCHY":
+ subsub = sub.row()
+ subsub.prop(linestyle, "same_object")
+ subsub.prop(linestyle, "rounds")
# Splitting
col = layout.column()
col.label(text="Splitting:")
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index 6d1b60f1d83..3cc75246b99 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -321,6 +321,7 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
#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
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 608d5c295a4..d98d1ae8b86 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -727,6 +727,11 @@ static void rna_def_linestyle(BlenderRNA *brna)
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);