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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-12 18:36:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-12 18:36:57 +0400
commitd17efa64a62054cc4061a537cece7ce69c925646 (patch)
treecbfc5f7137641c6182026772de8f65fce890ebd7 /source
parentd7221fd7c996c9bbad462b60d6053ed319f0fb7d (diff)
improve mesh error prints and quiet a print in mesh_ensure_tessellation_customdata() which happened too often.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c12
-rw-r--r--source/blender/blenkernel/intern/mesh.c17
2 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 59059589f0f..e6fb506620c 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -453,7 +453,7 @@ void DM_update_tessface_data(DerivedMesh *dm)
}
if (G.debug & G_DEBUG)
- printf("Updated tessellated customdata of dm %p\n", dm);
+ printf("%s: Updated tessellated customdata of dm %p\n", __func__, dm);
dm->dirty &= ~DM_DIRTY_TESS_CDLAYERS;
}
@@ -544,7 +544,7 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob)
* which shouuld be fed through the modifier
* stack*/
if (tmp.totvert != me->totvert && !did_shapekeys && me->key) {
- printf("YEEK! this should be recoded! Shape key loss!!!\n");
+ printf("%s: YEEK! this should be recoded! Shape key loss!: ID '%s'\n", __func__, tmp.id.name);
if (tmp.key) tmp.key->id.us--;
tmp.key = NULL;
}
@@ -1300,7 +1300,7 @@ static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape
kb->totelem = dm->numVertData;
kb->data = MEM_callocN(sizeof(float)*3*kb->totelem, "kb->data derivedmesh.c");
- fprintf(stderr, "%s: lost a shapekey layer! (bmesh internal error)\n", __func__);
+ fprintf(stderr, "%s: lost a shapekey layer: '%s'! (bmesh internal error)\n", __func__, kb->name);
}
}
}
@@ -1329,8 +1329,8 @@ static void add_shapekey_layers(DerivedMesh *dm, Mesh *me, Object *UNUSED(ob))
if (me->totvert != kb->totelem) {
fprintf(stderr,
- "%s: vertex size mismatch (mesh/keyblock) '%s' (%d != %d)\n",
- __func__, me->id.name+2, me->totvert, kb->totelem);
+ "%s: vertex size mismatch (Mesh '%s':%d != KeyBlock '%s':%d)\n",
+ __func__, me->id.name + 2, me->totvert, kb->name, kb->totelem);
array = MEM_callocN(shape_alloc_len, __func__);
}
else {
@@ -3022,7 +3022,7 @@ static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm)
}
}
else {
- printf("Error during creation polygon infos\n");
+ printf("%s: Error during creation polygon infos\n", __func__);
}
/* clean up */
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index ea061c99156..bcb95211bcc 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -325,13 +325,16 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
CustomData_from_bmeshpoly(&me->fdata, &me->pdata, &me->ldata, me->totface);
- /* note: this warning may be un-called for if we are inirializing the mesh for the
- * first time from bmesh, rather then giving a warning about this we could be smarter
- * and check if there was any data to begin with, for now just print the warning with
- * some info to help troubleshoot whats going on - campbell */
- printf("%s: warning! Tessellation uvs or vcol data got out of sync, "
- "had to reset!\n CD_MTFACE: %d != CD_MTEXPOLY: %d || CD_MCOL: %d != CD_MLOOPCOL: %d\n",
- __func__, tottex_tessface, tottex_original, totcol_tessface, totcol_original);
+ /* TODO - add some --debug-mesh option */
+ if (G.debug & G_DEBUG) {
+ /* note: this warning may be un-called for if we are inirializing the mesh for the
+ * first time from bmesh, rather then giving a warning about this we could be smarter
+ * and check if there was any data to begin with, for now just print the warning with
+ * some info to help troubleshoot whats going on - campbell */
+ printf("%s: warning! Tessellation uvs or vcol data got out of sync, "
+ "had to reset!\n CD_MTFACE: %d != CD_MTEXPOLY: %d || CD_MCOL: %d != CD_MLOOPCOL: %d\n",
+ __func__, tottex_tessface, tottex_original, totcol_tessface, totcol_original);
+ }
}
}
}