From b85985535dd420e50cc906bd6e7dd352cc2b8b97 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 22 May 2010 22:21:15 +0000 Subject: 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). --- source/blender/freestyle/intern/application/Controller.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/freestyle/intern/application/Controller.cpp') 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; } -- cgit v1.2.3