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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-02-18 22:00:23 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-03-13 15:46:55 +0300
commita1a7317f6b098ab6928f33754e57de219877cb64 (patch)
treed14b44056f99d292567fe82c39d6f8d14e6f634d /source/blender/blenkernel/BKE_customdata.h
parent2ef2f085fb743c12d1cabd71d42dd00334de696b (diff)
Add argument to DM_to_mesh() function to take ownership over the DM
The idea is pretty simple: instead of making temporary copy of all the related custom data layers just pass the ownership from the DM to the mesh. This is really handy in cases when you've got DM which you need to convert to Mesh datablock and wouldn't need that DM after conversion anyway. Foe example, render database conversion, exporters and even Modifier Apply will benefit from this option. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1127
Diffstat (limited to 'source/blender/blenkernel/BKE_customdata.h')
-rw-r--r--source/blender/blenkernel/BKE_customdata.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 9028ad09265..6a0cfefb1c2 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -96,6 +96,11 @@ bool CustomData_has_math(const struct CustomData *data);
bool CustomData_has_interp(const struct CustomData *data);
bool CustomData_bmesh_has_free(const struct CustomData *data);
+/**
+ * Checks if any of the customdata layers is referenced.
+ */
+bool CustomData_has_referenced(const struct CustomData *data);
+
/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to
* another, while not overwriting anything else (e.g. flags). probably only
* implemented for mloopuv/mloopcol, for now.*/
@@ -142,6 +147,9 @@ void CustomData_reset(struct CustomData *data);
*/
void CustomData_free(struct CustomData *data, int totelem);
+/* same as above, but only frees layers which matches the given mask. */
+void CustomData_free_typemask(struct CustomData *data, int totelem, CustomDataMask mask);
+
/* frees all layers with CD_FLAG_TEMPORARY */
void CustomData_free_temporary(struct CustomData *data, int totelem);