diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-18 22:00:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-13 15:46:55 +0300 |
commit | a1a7317f6b098ab6928f33754e57de219877cb64 (patch) | |
tree | d14b44056f99d292567fe82c39d6f8d14e6f634d /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | 2ef2f085fb743c12d1cabd71d42dd00334de696b (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_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 04251641d9b..236eae29967 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -503,7 +503,7 @@ int DM_release(DerivedMesh *dm); /** utility function to convert a DerivedMesh to a Mesh */ -void DM_to_mesh(DerivedMesh *dm, struct Mesh *me, struct Object *ob, CustomDataMask mask); +void DM_to_mesh(DerivedMesh *dm, struct Mesh *me, struct Object *ob, CustomDataMask mask, bool take_ownership); struct BMEditMesh *DM_to_editbmesh(struct DerivedMesh *dm, struct BMEditMesh *existing, const bool do_tessellate); |