Fix T71986: Alembic: object constraints animation no longer exported
authorSybren A. Stüvel <sybren@blender.org>
Fri, 29 Nov 2019 13:09:16 +0000 (14:09 +0100)
committerSybren A. Stüvel <sybren@blender.org>
Fri, 29 Nov 2019 13:09:21 +0000 (14:09 +0100)
`AbcTransformWriter::hasAnimation` recently became smarter than just
returning `true`, but wasn't quite smart enough yet. Constraints are now
considered a source of 'animation'.

source/blender/alembic/intern/abc_transform.cc

index 9b12fe86d590b31cf8b4f6fc1dabdd2339334bae..9fc52d71e2337df91819a3292188bb8776c79dbb 100644 (file)
@@ -27,6 +27,7 @@
 extern "C" {
 #include "DNA_object_types.h"
 
+#include "BLI_listbase.h"
 #include "BLI_math.h"
 
 #include "BKE_animsys.h"
@@ -133,7 +134,7 @@ Imath::Box3d AbcTransformWriter::bounds()
 
 bool AbcTransformWriter::hasAnimation(Object *ob) const
 {
-  return BKE_animdata_id_is_animated(&ob->id);
+  return !BLI_listbase_is_empty(&ob->constraints) || BKE_animdata_id_is_animated(&ob->id);
 }
 
 /* ************************************************************************** */