[Bf-blender-cvs] [0829bd7b66a] master: Alembic export: avoid BLI_assert() failure when object is not in depsgraph

Sybren A. Stüvel noreply at git.blender.org
Wed Jul 10 09:57:26 CEST 2019


Commit: 0829bd7b66a709ea924cacf90cc1469e6907af5a
Author: Sybren A. Stüvel
Date:   Wed Jul 10 09:56:27 2019 +0200
Branches: master
https://developer.blender.org/rB0829bd7b66a709ea924cacf90cc1469e6907af5a

Alembic export: avoid BLI_assert() failure when object is not in depsgraph

When the object we iterate over is not part of the depsgraph, we cannot
get the evaluated copy to export. This workaround is temporary to avoid
a BLI_assert() failure getting the evaluated mesh of this object.

This will be handled more elegantly in the new AbstractHierarchyIterator
that I'm working on, but that requires a bigger change than we should
allow this close to the 2.80 release candidate.

This fixes a problem described in T58686.

===================================================================

M	source/blender/alembic/intern/abc_exporter.cc

===================================================================

diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index e39b5686c82..56fb5a68402 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -165,6 +165,15 @@ static bool export_object(const ExportSettings *const settings,
     }
   }
 
+  Object *ob_eval = DEG_get_evaluated_object(settings->depsgraph, base->object);
+  if ((ob_eval->id.tag & LIB_TAG_COPIED_ON_WRITE) == 0) {
+    /* XXX fix after 2.80: the object was not part of the depsgraph, and thus we cannot get the
+     * evaluated copy to export. This will be handled more elegantly in the new
+     * AbstractHierarchyIterator that Sybren is working on. This condition is temporary, and avoids
+     * a BLI_assert() failure getting the evaluated mesh of this object. */
+    return false;
+  }
+
   //  if (settings->renderable_only && (ob->restrictflag & OB_RESTRICT_RENDER)) {
   //      return false;
   //  }



More information about the Bf-blender-cvs mailing list