Blender V5.0
blender::bke::animdata Namespace Reference

Functions

void action_slots_user_cache_invalidate (Main &bmain)
bool prop_is_animated (const AnimData *adt, StringRefNull rna_path, int array_index)

Function Documentation

◆ action_slots_user_cache_invalidate()

void blender::bke::animdata::action_slots_user_cache_invalidate ( Main & bmain)

Action Slots keep a runtime list of the IDs animated by them.

This function mark this 'user cache' as 'dirty', triggering a full rebuild next time it is accessed.

This is typically only necessary after remapping IDs, swapping them, etc, and only called from low-level code.

Note
This function invalidates all user caches of all Action Slots of all Actions in this bmain.
See also
blender::animrig::Slot::users_invalidate()
blender::animrig::internal::rebuild_slot_user_cache()

Definition at line 1377 of file anim_data.cc.

References blender::animrig::Slot::users_invalidate().

Referenced by id_swap().

◆ prop_is_animated()

bool blender::bke::animdata::prop_is_animated ( const AnimData * adt,
StringRefNull rna_path,
int array_index )

Return whether there is any animation on the given property.

This covers animation by direct Action assignment, the NLA, and drivers.

Note
This performs a full scan of all Actions (direct assignment and each NLA Action strip), as well as all drivers.
Parameters
adtcan be nullptr, in which case the function will return false.

Definition at line 1382 of file anim_data.cc.

References adt_apply_all_fcurves_cb(), FCurve::array_index, and FCurve::rna_path.

Referenced by grease_pencil_set_runtime_visibilities().