diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-09 14:41:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-09 14:41:05 +0400 |
commit | 1e784c54cd78d75a6eb94eccf81161265e297321 (patch) | |
tree | edd70cb4f722ced8c4474c10f74baa14321477de /source/blender/blenkernel/BKE_customdata.h | |
parent | efcfe88adccbc1ce76407887aef61dab349d7eb2 (diff) |
bmesh speedup: skip free-realloc while running CustomData_bmesh_merge() when nothing is changed (happens quite often that there is nothing to do).
Diffstat (limited to 'source/blender/blenkernel/BKE_customdata.h')
-rw-r--r-- | source/blender/blenkernel/BKE_customdata.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index bc94ab8ed41..b72667b5935 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -115,13 +115,13 @@ void CustomData_update_typemap(struct CustomData *data); /* same as the above, except that this will preserve existing layers, and only * add the layers that were not there yet */ -void CustomData_merge(const struct CustomData *source, struct CustomData *dest, +bool CustomData_merge(const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem); /* bmesh version of CustomData_merge; merges the layouts of source and dest, * then goes through the mesh and makes sure all the customdata blocks are * consistent with the new layout.*/ -void CustomData_bmesh_merge(struct CustomData *source, struct CustomData *dest, +bool CustomData_bmesh_merge(struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, struct BMesh *bm, const char htype); /** NULL's all members and resets the typemap. */ @@ -167,6 +167,7 @@ bool CustomData_has_layer(const struct CustomData *data, int type); /* returns the number of layers with this type */ int CustomData_number_of_layers(const struct CustomData *data, int type); +int CustomData_number_of_layers_typemask(const struct CustomData *data, CustomDataMask mask); /* duplicate data of a layer with flag NOFREE, and remove that flag. * returns the layer data */ |