diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-05-23 02:21:15 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-05-23 02:21:15 +0400 |
commit | b85985535dd420e50cc906bd6e7dd352cc2b8b97 (patch) | |
tree | 79c4e7703d218855b7460bd5b32e85ee3926d885 /source/blender/freestyle/intern/application | |
parent | dbcb73c033fc15fc0df2ab0a05ac0b2c4a9a31b1 (diff) |
New option for detecting feature edges at material boundaries.
A checkbox "Material Boundaries" has been added to the Freestyle
options in the Layers tab of the Render buttons. By enabling the
option, any edge between two faces with different materials is
detected as a feature edge. In style modules, edges at material
boundaries can be tested with pyNatureUP1D(Nature.MATERIAL_BOUNDARY).
Diffstat (limited to 'source/blender/freestyle/intern/application')
-rwxr-xr-x | source/blender/freestyle/intern/application/Controller.cpp | 12 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/application/Controller.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index 76c9023df57..707f4e7118c 100755 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -114,6 +114,7 @@ Controller::Controller() _ComputeRidges = true; _ComputeSteerableViewMap = false; _ComputeSuggestive = true; + _ComputeMaterialBoundaries = true; _sphereRadius = 1.0; init_options(); @@ -466,6 +467,7 @@ void Controller::ComputeViewMap() edgeDetector.enableOrthographicProjection(proj[3][3] != 0.0); edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); edgeDetector.enableSuggestiveContours(_ComputeSuggestive); + edgeDetector.enableMaterialBoundaries(_ComputeMaterialBoundaries); edgeDetector.setSphereRadius(_sphereRadius); edgeDetector.setSuggestiveContourKrDerivativeEpsilon(_suggestiveContourKrDerivativeEpsilon); edgeDetector.processShapes(*_winged_edge); @@ -647,6 +649,7 @@ void Controller::setComputeRidgesAndValleysFlag(bool iBool){ bool Controller::getComputeRidgesAndValleysFlag() const { return _ComputeRidges; } + void Controller::setComputeSuggestiveContoursFlag(bool b){ _ComputeSuggestive = b; } @@ -654,6 +657,15 @@ void Controller::setComputeSuggestiveContoursFlag(bool b){ bool Controller::getComputeSuggestiveContoursFlag() const { return _ComputeSuggestive; } + +void Controller::setComputeMaterialBoundariesFlag(bool b){ + _ComputeMaterialBoundaries = b; +} + +bool Controller::getComputeMaterialBoundariesFlag() const { + return _ComputeMaterialBoundaries; +} + void Controller::setComputeSteerableViewMapFlag(bool iBool){ _ComputeSteerableViewMap = iBool; } diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h index 422707d3c1f..739e49c16ca 100755 --- a/source/blender/freestyle/intern/application/Controller.h +++ b/source/blender/freestyle/intern/application/Controller.h @@ -119,6 +119,8 @@ public: bool getComputeRidgesAndValleysFlag() const ; void setComputeSuggestiveContoursFlag(bool b); bool getComputeSuggestiveContoursFlag() const ; + void setComputeMaterialBoundariesFlag(bool b); + bool getComputeMaterialBoundariesFlag() const ; void setComputeSteerableViewMapFlag(bool iBool); bool getComputeSteerableViewMapFlag() const; @@ -222,6 +224,7 @@ private: bool _EnableQI; bool _ComputeRidges; bool _ComputeSuggestive; + bool _ComputeMaterialBoundaries; real _sphereRadius; real _suggestiveContourKrDerivativeEpsilon; |