diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-07-10 10:56:27 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-07-10 10:56:27 +0300 |
commit | 0829bd7b66a709ea924cacf90cc1469e6907af5a (patch) | |
tree | 36a47b509774186729602caf05a6b34cad50b2eb /source/blender | |
parent | e927ce8acb6848974077fbbd6dc110dd3948b48a (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/alembic/intern/abc_exporter.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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; // } |