Alembic: fix parenting issues when an object has multiple curves/points
authorKévin Dietrich <kevin.dietrich@mailoo.org>
Mon, 5 Sep 2016 01:46:25 +0000 (03:46 +0200)
committerKévin Dietrich <kevin.dietrich@mailoo.org>
Mon, 5 Sep 2016 01:46:25 +0000 (03:46 +0200)
subobjects.

source/blender/alembic/intern/alembic_capi.cc

index d057cc341f6da08b28b7e9c0880efe774ac10794..477448f1835e56fc0c5e90a30aa32ad2d6b1aae7 100644 (file)
@@ -599,10 +599,6 @@ struct ImportJobData {
 
 ABC_INLINE bool is_mesh_and_strands(const IObject &object)
 {
-       if (object.getNumChildren() != 2) {
-               return false;
-       }
-
        bool has_mesh = false;
        bool has_curve = false;
 
@@ -624,6 +620,9 @@ ABC_INLINE bool is_mesh_and_strands(const IObject &object)
                else if (ICurves::matches(md)) {
                        has_curve = true;
                }
+               else if (IPoints::matches(md)) {
+                       has_curve = true;
+               }
        }
 
        return has_mesh && has_curve;