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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-10-10 23:57:06 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-10-10 23:57:06 +0400
commit28cc31ba11f805c4cac2a250b4181ec9c556b8da (patch)
treeb2f4a046d730b764e4c2c86217f1c9299f9bc2f7 /release/scripts/freestyle/style_modules/parameter_editor.py
parent6c64286cab1db74731631609e32ccc48a7d0d2f4 (diff)
Stability improvements for the Face Smoothness option.
The instability considered here is due to a persistent failure of the getFEdge() method in the Interface0D class and its subclasses in the presence of smooth FEdges. When the Face Smoothness option is enabled, the view map is populated with not only sharp FEdges (i.e., edges in the original meshes) but also smooth FEdges (i.e., newly built edges lying on triangular surfaces). The failure of getFEdge() caused many related issues because the method is widely used in other predicates and functions that rely on it. The most prominent example of related user-visible problems is a constant failure of the built-in MaterialF0D. The main issue and related problems were addressed as follows: * A bug in the construction of smooth FEdges was fixed. Individual smooth FEdges, even when they were detected as a series of smooth FEdges that constitute one smooth ViewEdge, may have some irregular geometry in the form of non-uniform OWXFaceLayer::order values. The OWXFaceLayer::order values were used in an inappropriate way, so that resulting smooth ViewEdges may have an FEdge between two subsequent SVertices that were indeed the same SVertex object. This was an unexpected situation that getFEdge() could not handle. * Another issue in the construction of smooth FEdges was resolved. When sharp FEdges are constructed, two SVertices at both ends of an FEdge are generated only when no SVertex exists in a given 3D position (this way, the original mesh topology is reconstructed from a bunch of independent triangles that the BlenderFileLoader class passes to the view map creation process). This sharing of SVertices was used also for the generation of SVertices at the two ends of each smooth FEdge, causing the getFEdge() failure in the presence of smooth FEdges. The workaround implemented here is to simply suppress the sharing of generated SVertices when smooth FEdges are created. * In the Parameter Editor mode, the built-in MaterialF0D was replaced with a better implementation that works well with Curves and Strokes. MaterialF0D does not work with these 1D data types.
Diffstat (limited to 'release/scripts/freestyle/style_modules/parameter_editor.py')
-rw-r--r--release/scripts/freestyle/style_modules/parameter_editor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
index 68ba077277e..80ac350a39a 100644
--- a/release/scripts/freestyle/style_modules/parameter_editor.py
+++ b/release/scripts/freestyle/style_modules/parameter_editor.py
@@ -287,7 +287,7 @@ class ThicknessDistanceFromObjectShader(CurveMappingModifier):
# Material modifiers
def iter_material_color(stroke, material_attr):
- func = MaterialF0D()
+ func = CurveMaterialF0D()
it = stroke.strokeVerticesBegin()
while not it.isEnd():
material = func(it.castToInterface0DIterator())
@@ -305,7 +305,7 @@ def iter_material_color(stroke, material_attr):
it.increment()
def iter_material_value(stroke, material_attr):
- func = MaterialF0D()
+ func = CurveMaterialF0D()
it = stroke.strokeVerticesBegin()
while not it.isEnd():
material = func(it.castToInterface0DIterator())