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:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-02-15 17:32:15 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-06 17:04:31 +0300
commit00e0a94b3c96f8971dbd1a933856d2735a83b219 (patch)
tree82ae8e1ac187d169944294b46b3604a1a5ec85d3 /source/blender/alembic
parentcbe0709db2df800db218ea91da2933a745500f57 (diff)
Alembic: import empties under their own name in Alembic, not their parent's
Before this commit something strange happened, as the m_data_name of an inherit data-less object was used.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_transform.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/alembic/intern/abc_transform.cc b/source/blender/alembic/intern/abc_transform.cc
index 99bf7de93f7..5f807e2eb46 100644
--- a/source/blender/alembic/intern/abc_transform.cc
+++ b/source/blender/alembic/intern/abc_transform.cc
@@ -132,6 +132,10 @@ bool AbcTransformWriter::hasAnimation(Object * /*ob*/) const
AbcEmptyReader::AbcEmptyReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
: AbcObjectReader(object, settings)
{
+ /* Empties have no data. It makes the import of Alembic files easier to
+ * understand when we name the empty after its name in Alembic. */
+ m_object_name = object.getName();
+
Alembic::AbcGeom::IXform xform(object, Alembic::AbcGeom::kWrapExisting);
m_schema = xform.getSchema();
@@ -145,6 +149,7 @@ bool AbcEmptyReader::valid() const
void AbcEmptyReader::readObjectData(Main *bmain, float /*time*/)
{
- m_object = BKE_object_add_only_object(bmain, OB_EMPTY, m_data_name.c_str());
+ const char *empty_name = m_iobject.getName().c_str();
+ m_object = BKE_object_add_only_object(bmain, OB_EMPTY, empty_name);
m_object->data = NULL;
}