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:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-05-27 02:46:28 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-05-27 02:46:28 +0400
commit822362189badefd6c0014f608d36d98e8ab57282 (patch)
tree3f1a8a574aa311b11bbefe5f4191149e659a9f7f /source/blender/collada/GeometryExporter.cpp
parent54b64cfd612922054f014460f1c08ec4b0374a3d (diff)
[#31607] Collada: (Exporter) Implementation of 'use Object Instantiation' Option
Diffstat (limited to 'source/blender/collada/GeometryExporter.cpp')
-rw-r--r--source/blender/collada/GeometryExporter.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index f92ee1a2b79..6df16165e4b 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -92,16 +92,20 @@ void GeometryExporter::operator()(Object *ob)
DerivedMesh *dm = mesh_get_derived_final(mScene, ob, CD_MASK_BAREMESH);
#endif
+ bool use_instantiation = this->export_settings->use_object_instantiation;
Mesh *me = get_mesh(ob, this->export_settings->apply_modifiers);
- std::string geom_id = get_geometry_id(ob);
- std::string geom_name = id_name(ob->data);
+ std::string geom_id = get_geometry_id(ob, use_instantiation);
std::vector<Normal> nor;
std::vector<Face> norind;
// Skip if linked geometry was already exported from another reference
- if (exportedGeometry.find(geom_id) != exportedGeometry.end())
+ if (use_instantiation &&
+ exportedGeometry.find(geom_id) != exportedGeometry.end())
return;
+
+ std::string geom_name = (use_instantiation) ? id_name(ob->data) : id_name(ob);
+
exportedGeometry.insert(geom_id);
bool has_color = (bool)CustomData_has_layer(&me->fdata, CD_MCOL);