Fix T49249: Alembic export with multiple hair systems crash blender
authorKévin Dietrich <kevin.dietrich@mailoo.org>
Mon, 5 Sep 2016 01:32:36 +0000 (03:32 +0200)
committerKévin Dietrich <kevin.dietrich@mailoo.org>
Mon, 5 Sep 2016 01:32:36 +0000 (03:32 +0200)
Crash was due to a name collision in Alembic objects caused by the fact
that names derive from the one of the Blender object. An object having
multiple particles system would thus give its name to various
subobjects.

Now use the name of the particles system for the Alembic object.

source/blender/alembic/intern/abc_hair.cc
source/blender/alembic/intern/abc_points.cc

index 45bf9b7ab8a1ebfa52d9649d6acb1aed12d90f7b..14bcf6731ea51cb5d7e001c9e05c7b13eb955bc6 100644 (file)
@@ -59,7 +59,7 @@ AbcHairWriter::AbcHairWriter(Scene *scene,
 {
        m_psys = psys;
 
-       OCurves curves(parent->alembicXform(), m_name, m_time_sampling);
+       OCurves curves(parent->alembicXform(), psys->name, m_time_sampling);
        m_schema = curves.getSchema();
 }
 
index 322bb906bf50144065ab78bb5126a366a96a6e20..03014547416de913dc796dc487eb093e0ba51e28 100644 (file)
@@ -67,7 +67,7 @@ AbcPointsWriter::AbcPointsWriter(Scene *scene,
 {
        m_psys = psys;
 
-       OPoints points(parent->alembicXform(), m_name, m_time_sampling);
+       OPoints points(parent->alembicXform(), psys->name, m_time_sampling);
        m_schema = points.getSchema();
 }