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:
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_log.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index 04ad80214c2..dcfe53605a6 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -1003,3 +1003,31 @@ void bm_log_print(const BMLog *log, const char *description)
}
}
#endif
+
+void BM_log_print_entry(BMesh *bm, BMLogEntry *entry)
+{
+ if (bm) {
+ printf("BM { totvert=%d totedge=%d totloop=%d totpoly=%d\n",
+ bm->totvert,
+ bm->totedge,
+ bm->totloop,
+ bm->totface);
+
+ if (!bm->totvert) {
+ printf("%s: Warning: empty bmesh\n", __func__);
+ }
+ }
+ else {
+ printf("BM { totvert=unknown totedge=unknown totloop=unknown totpoly=unknown\n");
+ }
+
+ printf("v | added: %d, removed: %d, modified: %d\n",
+ BLI_ghash_len(entry->added_verts),
+ BLI_ghash_len(entry->deleted_verts),
+ BLI_ghash_len(entry->modified_verts));
+ printf("f | added: %d, removed: %d, modified: %d\n",
+ BLI_ghash_len(entry->added_faces),
+ BLI_ghash_len(entry->deleted_faces),
+ BLI_ghash_len(entry->modified_faces));
+ printf("}\n");
+}