diff options
author | Bastien Montagne <bastien@blender.org> | 2020-08-06 16:03:49 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-08-06 16:03:49 +0300 |
commit | 77d71cc11319acaf1163447f490a97bba6cfd0ab (patch) | |
tree | 08d6a6c13196c9ca3da3d4c70e496675cae5c44b /source/blender/blenkernel/intern | |
parent | e4f400f0d659b835b748fb4dcea4baaa110264fc (diff) |
Move CDData debug print helper from DM to CustomData 'namespace'/files.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 26 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index b40cc4e8b9f..8031e3dadf8 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2358,32 +2358,6 @@ void DM_debug_print(DerivedMesh *dm) MEM_freeN(str); } -void DM_debug_print_cdlayers(CustomData *data) -{ - int i; - const CustomDataLayer *layer; - - printf("{\n"); - - for (i = 0, layer = data->layers; i < data->totlayer; i++, layer++) { - - const char *name = CustomData_layertype_name(layer->type); - const int size = CustomData_sizeof(layer->type); - const char *structname; - int structnum; - CustomData_file_write_info(layer->type, &structname, &structnum); - printf(" dict(name='%s', struct='%s', type=%d, ptr='%p', elem=%d, length=%d),\n", - name, - structname, - layer->type, - (const void *)layer->data, - size, - (int)(MEM_allocN_len(layer->data) / size)); - } - - printf("}\n"); -} - bool DM_is_valid(DerivedMesh *dm) { const bool do_verbose = true; diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 22d4af6fa39..707db46a856 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -4569,6 +4569,32 @@ bool CustomData_layer_validate(CustomDataLayer *layer, const uint totitems, cons return false; } +void CustomData_layers__print(CustomData *data) +{ + int i; + const CustomDataLayer *layer; + + printf("{\n"); + + for (i = 0, layer = data->layers; i < data->totlayer; i++, layer++) { + + const char *name = CustomData_layertype_name(layer->type); + const int size = CustomData_sizeof(layer->type); + const char *structname; + int structnum; + CustomData_file_write_info(layer->type, &structname, &structnum); + printf(" dict(name='%s', struct='%s', type=%d, ptr='%p', elem=%d, length=%d),\n", + name, + structname, + layer->type, + (const void *)layer->data, + size, + (int)(MEM_allocN_len(layer->data) / size)); + } + + printf("}\n"); +} + /****************************** External Files *******************************/ static void customdata_external_filename(char filename[FILE_MAX], |