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/collada
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/collada')
-rw-r--r--source/blender/collada/collada_utils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index d91689ff496..f15efa89ea6 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -164,8 +164,7 @@ Mesh *bc_get_mesh_copy(Scene *scene, Object *ob, BC_export_mesh_type export_mesh
}
tmpmesh = BKE_mesh_add(G.main, "ColladaMesh"); // name is not important here
- DM_to_mesh(dm, tmpmesh, ob, CD_MASK_MESH);
- dm->release(dm);
+ DM_to_mesh(dm, tmpmesh, ob, CD_MASK_MESH, true);
if (triangulate) {
bc_triangulate_mesh(tmpmesh);