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:
authorLukas Stockner <lukas.stockner@freenet.de>2022-10-30 00:41:21 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2022-10-30 01:14:59 +0300
commitbc37e8d8399eef686b71341aa90eced9bc117786 (patch)
tree92e4af388150209df9bc44e2cba6f2f303aa7baf /source/blender/bmesh/intern/bmesh_log.c
parent552abb838c76d44a0d7d1226b59a1ab381e88386 (diff)
parentd1d2f002c7caaf4ab457ec27bbc44666d7aac624 (diff)
Merge remote-tracking branch 'origin/master' into principled-v2
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_log.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index 64e6c63e9f0..a8a9390f525 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -288,7 +288,8 @@ static void bm_log_verts_restore(BMesh *bm, BMLog *log, GHash *verts)
static void bm_log_faces_restore(BMesh *bm, BMLog *log, GHash *faces)
{
GHashIterator gh_iter;
- const int cd_face_sets = CustomData_get_offset(&bm->pdata, CD_SCULPT_FACE_SETS);
+ const int cd_face_sets = CustomData_get_offset_named(
+ &bm->pdata, CD_PROP_INT32, ".sculpt_face_set");
GHASH_ITER (gh_iter, faces) {
void *key = BLI_ghashIterator_getKey(&gh_iter);
@@ -1002,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",
+ (int)BLI_ghash_len(entry->added_verts),
+ (int)BLI_ghash_len(entry->deleted_verts),
+ (int)BLI_ghash_len(entry->modified_verts));
+ printf("f | added: %d, removed: %d, modified: %d\n",
+ (int)BLI_ghash_len(entry->added_faces),
+ (int)BLI_ghash_len(entry->deleted_faces),
+ (int)BLI_ghash_len(entry->modified_faces));
+ printf("}\n");
+}