diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-10-06 06:04:43 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-10-06 06:04:43 +0400 |
commit | f84e8e76406a30bd15e6e55e41714e62826315aa (patch) | |
tree | e4a077ee05de21155421b35854162ad5f29c53b3 /source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp | |
parent | cb4f6629279ba9792cc46114fe603bebff11c6a3 (diff) |
Fine control of feature edge selection with mesh face and edge marks.
New "face marks" and "edge marks" have been introduced in mesh data
blocks. In the edit mode of a mesh object, face marks can be put
to selected faces by choosing Mesh >> Faces >> Mark Freestyle Face
from the menu of a 3D View window or Ctrl-F >> Mark Freestyle Face
from the context menu. Similarly, edge marks can be put to selected
edges by Mesh >> Edges >> Mark Freestyle Edge or Ctrl-E >> Mark
Freestyle Edge. These marks should work fine with the Subdivision
surface modifier.
Moreover, two new conditions for feature edge selection have been
added to the Parameter Editor mode as described below:
1. The Selection by Edge Types option has now the new Edge Mark type,
which can be used to (de)select feature edges having edge marks.
This option can be used to add to (or remove from) the view map
arbitrary edges of mesh objects.
2. Selection by Face Marks option has been newly introduced, in which
face marks are used for feature edge selection in two ways. One
option is called "One Face" which is to (de)select feature edges if
one of faces on the left and right of each feature edge has a face
mark. The other option is "Both Faces" to (de)select feature edges
if both faces on the left and right have a face mark.
Diffstat (limited to 'source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp')
-rwxr-xr-x | source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp index 93e3354cb6a..1cbed8a87c6 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp @@ -72,6 +72,7 @@ void FEdgeXDetector::processShapes(WingedEdge& we) { if(_computeSuggestiveContours) processSuggestiveContourShape(wxs); processSilhouetteShape(wxs); + processEdgeMarksShape(wxs); if (progressBarDisplay) _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); @@ -708,6 +709,26 @@ void FEdgeXDetector::ProcessMaterialBoundaryEdge(WXEdge *iEdge) } } +// EDGE MARKS +///////////// + +void FEdgeXDetector::processEdgeMarksShape(WXShape* iShape) { + // Make a pass on the edges to detect material boundaries + vector<WEdge*>::iterator we, weend; + vector<WEdge*> &wedges = iShape->getEdgeList(); + for(we=wedges.begin(), weend=wedges.end(); + we!=weend; + ++we){ + ProcessEdgeMarks((WXEdge*)(*we)); + } +} + +void FEdgeXDetector::ProcessEdgeMarks(WXEdge *iEdge) { + if (iEdge->GetMark()) { + iEdge->AddNature(Nature::EDGE_MARK); + } +} + // Build Smooth edges ///////////////////// void FEdgeXDetector::buildSmoothEdges(WXShape* iShape){ |