Nuke DM out of collada code.

Also, now use out-of-main temp copy of mesh for export, and fixed a
potential memleak (return without freeing temp copy of mesh, tsst).
This commit is contained in:
2018-06-24 18:40:52 +02:00
parent d0856d1d54
commit a59d7374ea
7 changed files with 23 additions and 29 deletions

View File

@@ -40,7 +40,6 @@
extern "C" {
#include "BLI_utildefines.h"
#include "BKE_DerivedMesh.h"
#include "BKE_main.h"
#include "BKE_global.h"
#include "BKE_library.h"
@@ -72,14 +71,8 @@ void GeometryExporter::exportGeom(Main *bmain, struct Depsgraph *depsgraph, Scen
void GeometryExporter::operator()(Object *ob)
{
// XXX don't use DerivedMesh, Mesh instead?
#if 0
DerivedMesh *dm = mesh_get_derived_final(mScene, ob, CD_MASK_BAREMESH);
#endif
bool use_instantiation = this->export_settings->use_object_instantiation;
Mesh *me = bc_get_mesh_copy(
m_bmain,
mDepsgraph,
mScene,
ob,
@@ -170,8 +163,7 @@ void GeometryExporter::operator()(Object *ob)
}
}
BKE_libblock_free_us(m_bmain, me);
BKE_id_free(NULL, me);
}
void GeometryExporter::export_key_mesh(Object *ob, Mesh *me, KeyBlock *kb)