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-06 06:04:43 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-10-06 06:04:43 +0400
commitf84e8e76406a30bd15e6e55e41714e62826315aa (patch)
treee4a077ee05de21155421b35854162ad5f29c53b3 /source/blender/freestyle/intern/winged_edge/WEdge.h
parentcb4f6629279ba9792cc46114fe603bebff11c6a3 (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/winged_edge/WEdge.h')
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/WEdge.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index abb6263ae69..dc920448add 100755
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -372,6 +372,7 @@ protected:
WOEdge *_paOEdge; // first oriented edge
WOEdge *_pbOEdge; // second oriented edge
int _nOEdges; // number of oriented edges associated with this edge. (1 means border edge)
+ bool _Mark; // user-specified edge mark for feature edge detection
int _Id; // Identifier for the edge
public:
@@ -448,6 +449,7 @@ public:
inline WOEdge * GetaOEdge() {return _paOEdge;}
inline WOEdge * GetbOEdge() {return _pbOEdge;}
inline int GetNumberOfOEdges() {return _nOEdges;}
+ inline bool GetMark() {return _Mark;}
inline int GetId() {return _Id;}
inline WVertex * GetaVertex() {return _paOEdge->GetaVertex();}
inline WVertex * GetbVertex() {return _paOEdge->GetbVertex();}
@@ -480,6 +482,7 @@ public:
}
}
inline void setNumberOfOEdges(int n) {_nOEdges = n;}
+ inline void setMark(bool mark) {_Mark = mark;}
inline void setId(int id) {_Id = id;}
virtual void ResetUserData() {userdata = 0;}
};
@@ -505,6 +508,7 @@ protected:
int _Id;
unsigned _FrsMaterialIndex;
+ bool _Mark; // Freestyle face mark (if true, feature edges on this face are ignored)
public:
void *userdata;
@@ -520,6 +524,7 @@ public:
inline Vec3r& GetNormal() {return _Normal;}
inline int GetId() {return _Id;}
inline unsigned frs_materialIndex() const {return _FrsMaterialIndex;}
+ inline bool GetMark() const {return _Mark;}
const FrsMaterial& frs_material() ;
/*! The vertex of index i corresponds to the a vertex
@@ -663,6 +668,7 @@ public:
inline void setTexCoordsList(const vector<Vec2r>& iTexCoordsList) {_VerticesTexCoords = iTexCoordsList;}
inline void setId(int id) {_Id = id;}
inline void setFrsMaterialIndex(unsigned iMaterialIndex) {_FrsMaterialIndex = iMaterialIndex;}
+ inline void setMark(bool iMark) {_Mark = iMark;}
/*! designed to build a specialized WEdge
* for use in MakeEdge
@@ -791,7 +797,7 @@ public:
* iMaterialIndex
* The material index for this face
*/
- virtual WFace * MakeFace(vector<WVertex*>& iVertexList, unsigned iMaterialIndex);
+ virtual WFace * MakeFace(vector<WVertex*>& iVertexList, vector<bool>& iFaceEdgeMarksList, unsigned iMaterialIndex);
/*! adds a new face to the shape. The difference with
* the previous method is that this one is designed
@@ -814,7 +820,7 @@ public:
* The list of tex coords, iTexCoordsList[i] corresponding to the
* normal of the vertex iVertexList[i] for that face.
*/
- virtual WFace * MakeFace(vector<WVertex*>& iVertexList, vector<Vec3r>& iNormalsList, vector<Vec2r>& iTexCoordsList, unsigned iMaterialIndex);
+ virtual WFace * MakeFace(vector<WVertex*>& iVertexList, vector<Vec3r>& iNormalsList, vector<Vec2r>& iTexCoordsList, vector<bool>& iFaceEdgeMarksList, unsigned iMaterialIndex);
inline void AddEdge(WEdge *iEdge) {_EdgeList.push_back(iEdge);}
inline void AddFace(WFace* iFace) {_FaceList.push_back(iFace);}
@@ -892,7 +898,7 @@ protected:
* face
* The Face that is filled in
*/
- virtual WFace * MakeFace(vector<WVertex*>& iVertexList, unsigned iMaterialIndex, WFace *face);
+ virtual WFace * MakeFace(vector<WVertex*>& iVertexList, vector<bool>& iFaceEdgeMarksList, unsigned iMaterialIndex, WFace *face);
};