From eb63646605ddce336da7a8779ab86336133786b1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Jan 2022 15:09:48 +1100 Subject: BMesh: add mesh debug information printing - Add BM_mesh_debug_print & BM_mesh_debug_info. - Report flags in Mesh.cd_flag in BKE_mesh_debug_print - Move custom data printing into customdata.cc (noted as a TODO). Note that the term "runtime" has been removed from `BKE_mesh_runtime_debug_print` since these are useful for debugging any kind of mesh data. --- source/blender/blenkernel/BKE_mesh.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/blenkernel/BKE_mesh.h') diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index e7382ce448a..6554a9c72aa 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -23,6 +23,7 @@ */ #include "BKE_mesh_types.h" +#include "BLI_compiler_attrs.h" #include "BLI_utildefines.h" struct BLI_Stack; @@ -1038,6 +1039,13 @@ void BKE_mesh_batch_cache_free(struct Mesh *me); extern void (*BKE_mesh_batch_cache_dirty_tag_cb)(struct Mesh *me, eMeshBatchDirtyMode mode); extern void (*BKE_mesh_batch_cache_free_cb)(struct Mesh *me); +/* mesh_debug.c */ +#ifndef NDEBUG +char *BKE_mesh_debug_info(const struct Mesh *me) + ATTR_NONNULL(1) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT; +void BKE_mesh_debug_print(const struct Mesh *me) ATTR_NONNULL(1); +#endif + /* Inlines */ /* NOTE(@sybren): Instead of -1 that function uses ORIGINDEX_NONE as defined in BKE_customdata.h, -- cgit v1.2.3