Fix T71986: Alembic: object constraints animation no longer exported

`AbcTransformWriter::hasAnimation` recently became smarter than just
returning `true`, but wasn't quite smart enough yet. Constraints are now
considered a source of 'animation'.
This commit is contained in:
Sybren A. Stüvel 2019-11-29 14:09:16 +01:00
parent be1f4d875f
commit e7c7707ca9
Notes: blender-bot 2023-02-14 09:02:40 +01:00
Referenced by issue #71986, Alembic: object constraints animation no longer exported
1 changed files with 2 additions and 1 deletions

View 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);
}
/* ************************************************************************** */