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:
authorJacques Lucke <mail@jlucke.com>2018-10-18 16:43:06 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-18 16:43:06 +0300
commit41216d5ad4c722e2ad9f15c968af454fc7566d5e (patch)
treef68fe3e1dd32a2d651b6678a1783e165ce2e70c8 /source/blender/blenkernel/intern/mesh_validate.c
parentcfdd902d2d5d560262d1218861ad1a4469c5259f (diff)
Cleanup: Remove more #if 0 blocks
Continuation of https://developer.blender.org/D3802 Reviewers: brecht Differential Revision: https://developer.blender.org/D3808
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_validate.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index bfb3b107084..dd9d6fa448a 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -618,62 +618,6 @@ bool BKE_mesh_validate_arrays(
}
/* Test same polys. */
-#if 0
- {
- bool p1_sub = true, p2_sub = true;
-
- /* NOTE: This performs a sub-set test. */
- /* XXX This (and the sort of verts list) is better than systematic
- * search of all verts of one list into the other if lists have
- * a fair amount of elements.
- * Not sure however it's worth it in this case?
- * But as we also need sorted vert list to check verts multi-used
- * (in first pass of checks)... */
- /* XXX If we consider only "equal" polys (i.e. using exactly same set of verts)
- * as invalid, better to replace this by a simple memory cmp... */
- while ((p1_nv && p2_nv) && (p1_sub || p2_sub)) {
- if (*p1_v < *p2_v) {
- if (p1_sub)
- p1_sub = false;
- p1_nv--;
- p1_v++;
- }
- else if (*p2_v < *p1_v) {
- if (p2_sub)
- p2_sub = false;
- p2_nv--;
- p2_v++;
- }
- else {
- /* Equality, both next verts. */
- p1_nv--;
- p2_nv--;
- p1_v++;
- p2_v++;
- }
- }
- if (p1_nv && p1_sub)
- p1_sub = false;
- else if (p2_nv && p2_sub)
- p2_sub = false;
-
- if (p1_sub && p2_sub) {
- PRINT("\tPolys %u and %u use same vertices, considering poly %u as invalid.\n",
- prev_sp->index, sp->index, sp->index);
- sp->invalid = true;
- }
- /* XXX In fact, these might be valid? :/ */
- else if (p1_sub) {
- PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", sp->index, prev_sp->index);
- sp->invalid = true;
- }
- else if (p2_sub) {
- PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", prev_sp->index, sp->index);
- prev_sp->invalid = true;
- prev_sp = sp; /* sp is new reference poly. */
- }
- }
-#else
if ((p1_nv == p2_nv) && (memcmp(p1_v, p2_v, p1_nv * sizeof(*p1_v)) == 0)) {
if (do_verbose) {
PRINT_ERR("\tPolys %u and %u use same vertices (%d",
@@ -687,7 +631,6 @@ bool BKE_mesh_validate_arrays(
}
sp->invalid = true;
}
-#endif
else {
prev_sp = sp;
}