- added mesh_strip_loose_faces, works in conjunction with make_edges
to get rid of faces with MFace.v3==0 - change all Mesh's to have ->medge now. This is forced by make_edges on readfile, and in the various exotic important routines, and on conversion back in python. - make python NMesh structure always have medges now (needs testing) - with above two changes it is guarenteed that mf->v3 is never ==0 in main blender code (i.e., all MFace's are actually triangles or quads) and so I went through and removed all the historic tests to deal with MFace.v3==0. Equals lots of deleting, I am in heaven! - removed MEdge edcode flag, no longer needed - added experimental replacement for edge flag system Still are some inconsistencies in FACESELECT mode edge drawing to be ironed out. NOTE: This commit adds an experimental edge flag calc system, based on 10-seconds-of-thought algorithm by yours truly. Would appreciate feedback on how this system works, esp compared to old one and esp on complex or interesting models. To Use: New system is enabled by setting G.rt to a value between 1 and 1000 (Value of 0 uses old system). Value 1000 is reserved for "auto" edge, which is more or less identical to old system but also makes sure that at least 10% of edges are drawn (solves errors for super subdivided meshes). Values between 1 and 999 act as percent (out of 1000) of edges that should be drawn, starting with "most interesting" edges first. Please try it and comment!
This commit is contained in:
@@ -137,31 +137,23 @@ void EM_select_face_fgon(EditFace *efa, int val)
|
||||
/* only vertices */
|
||||
int faceselectedOR(EditFace *efa, int flag)
|
||||
{
|
||||
|
||||
if(efa->v1->f & flag) return 1;
|
||||
if(efa->v2->f & flag) return 1;
|
||||
if(efa->v3->f & flag) return 1;
|
||||
if(efa->v4 && (efa->v4->f & 1)) return 1;
|
||||
return 0;
|
||||
if ((efa->v1->f | efa->v2->f | efa->v3->f | (efa->v4?efa->v4->f:0))&flag) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// replace with (efa->f & SELECT)
|
||||
int faceselectedAND(EditFace *efa, int flag)
|
||||
{
|
||||
if(efa->v1->f & flag) {
|
||||
if(efa->v2->f & flag) {
|
||||
if(efa->v3->f & flag) {
|
||||
if(efa->v4) {
|
||||
if(efa->v4->f & flag) return 1;
|
||||
}
|
||||
else return 1;
|
||||
}
|
||||
}
|
||||
if ((efa->v1->f & efa->v2->f & efa->v3->f & (efa->v4?efa->v4->f:flag))&flag) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int EM_nfaces_selected(void)
|
||||
{
|
||||
EditMesh *em = G.editMesh;
|
||||
|
||||
Reference in New Issue
Block a user