Blender  V3.3
Typedefs | Enumerations | Functions
BKE_anim_data.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Typedefs

typedef enum eAnimData_MergeCopy_Modes eAnimData_MergeCopy_Modes
 

Enumerations

enum  eAnimData_MergeCopy_Modes { ADT_MERGECOPY_KEEP_DST = 0 , ADT_MERGECOPY_SRC_COPY = 1 , ADT_MERGECOPY_SRC_REF = 2 }
 

Functions

bool id_type_can_have_animdata (short id_type)
 
bool id_can_have_animdata (const struct ID *id)
 
struct AnimDataBKE_animdata_from_id (const struct ID *id)
 
struct AnimDataBKE_animdata_ensure_id (struct ID *id)
 
bool BKE_animdata_set_action (struct ReportList *reports, struct ID *id, struct bAction *act)
 
bool BKE_animdata_action_editable (const struct AnimData *adt)
 
bool BKE_animdata_action_ensure_idroot (const struct ID *owner, struct bAction *action)
 
void BKE_animdata_free (struct ID *id, bool do_id_user)
 
bool BKE_animdata_id_is_animated (const struct ID *id)
 
void BKE_animdata_foreach_id (struct AnimData *adt, struct LibraryForeachIDData *data)
 
struct AnimDataBKE_animdata_copy (struct Main *bmain, struct AnimData *adt, int flag)
 
bool BKE_animdata_copy_id (struct Main *bmain, struct ID *id_to, struct ID *id_from, int flag)
 
void BKE_animdata_copy_id_action (struct Main *bmain, struct ID *id)
 
void BKE_animdata_duplicate_id_action (struct Main *bmain, struct ID *id, uint duplicate_flags)
 
void BKE_animdata_merge_copy (struct Main *bmain, struct ID *dst_id, struct ID *src_id, eAnimData_MergeCopy_Modes action_mode, bool fix_drivers)
 
void BKE_animdata_blend_write (struct BlendWriter *writer, struct AnimData *adt)
 
void BKE_animdata_blend_read_data (struct BlendDataReader *reader, struct AnimData *adt)
 
void BKE_animdata_blend_read_lib (struct BlendLibReader *reader, struct ID *id, struct AnimData *adt)
 
void BKE_animdata_blend_read_expand (struct BlendExpander *expander, struct AnimData *adt)
 

Typedef Documentation

◆ eAnimData_MergeCopy_Modes

Enumeration Type Documentation

◆ eAnimData_MergeCopy_Modes

Enumerator
ADT_MERGECOPY_KEEP_DST 
ADT_MERGECOPY_SRC_COPY 
ADT_MERGECOPY_SRC_REF 

Definition at line 107 of file BKE_anim_data.h.

Function Documentation

◆ BKE_animdata_action_editable()

bool BKE_animdata_action_editable ( const struct AnimData adt)

◆ BKE_animdata_action_ensure_idroot()

bool BKE_animdata_action_ensure_idroot ( const struct ID owner,
struct bAction action 
)

Ensure that the action's idroot is set correctly given the ID type of the owner. Return true if it is, false if it was already set to an incompatible type.

Referenced by ED_id_action_ensure(), and what_does_obaction().

◆ BKE_animdata_blend_read_data()

void BKE_animdata_blend_read_data ( struct BlendDataReader reader,
struct AnimData adt 
)

◆ BKE_animdata_blend_read_expand()

void BKE_animdata_blend_read_expand ( struct BlendExpander expander,
struct AnimData adt 
)

◆ BKE_animdata_blend_read_lib()

void BKE_animdata_blend_read_lib ( struct BlendLibReader reader,
struct ID id,
struct AnimData adt 
)

◆ BKE_animdata_blend_write()

void BKE_animdata_blend_write ( struct BlendWriter writer,
struct AnimData adt 
)

◆ BKE_animdata_copy()

struct AnimData* BKE_animdata_copy ( struct Main bmain,
struct AnimData adt,
int  flag 
)

Make a copy of the given AnimData - to be used when copying data-blocks.

Parameters
flagControl ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.h
Returns
The copied animdata.

Definition at line 275 of file anim_data.c.

References AnimData::action, BKE_fcurves_copy(), BKE_id_copy_ex(), BKE_nla_tracks_copy_from_adt(), BLI_assert, BLI_listbase_clear(), AnimData::driver_array, AnimData::drivers, id_us_plus(), LIB_ID_COPY_ACTIONS, LIB_ID_CREATE_NO_MAIN, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN, NULL, AnimData::overrides, and AnimData::tmpact.

Referenced by BKE_animdata_copy_id(), BKE_libblock_copy_ex(), ED_armature_join_objects_exec(), and ED_gpencil_join_objects_exec().

◆ BKE_animdata_copy_id()

bool BKE_animdata_copy_id ( struct Main bmain,
struct ID id_to,
struct ID id_from,
int  flag 
)
Parameters
flagControl ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.h
Returns
true is successfully copied.

Definition at line 327 of file anim_data.c.

References IdAdtTemplate::adt, BKE_animdata_copy(), BKE_animdata_free(), BKE_animdata_from_id(), GS, LIB_ID_CREATE_NO_USER_REFCOUNT, and ID::name.

Referenced by make_links_data_exec().

◆ BKE_animdata_copy_id_action()

void BKE_animdata_copy_id_action ( struct Main bmain,
struct ID id 
)

Copy AnimData Actions.

Definition at line 372 of file anim_data.c.

References animdata_copy_id_action(), and ID_IS_OVERRIDE_LIBRARY.

◆ BKE_animdata_duplicate_id_action()

void BKE_animdata_duplicate_id_action ( struct Main bmain,
struct ID id,
uint  duplicate_flags 
)

◆ BKE_animdata_ensure_id()

struct AnimData* BKE_animdata_ensure_id ( struct ID id)

◆ BKE_animdata_foreach_id()

void BKE_animdata_foreach_id ( struct AnimData adt,
struct LibraryForeachIDData data 
)

◆ BKE_animdata_free()

void BKE_animdata_free ( struct ID id,
bool  do_id_user 
)

◆ BKE_animdata_from_id()

struct AnimData* BKE_animdata_from_id ( const struct ID id)

Get AnimData from the given ID-block.

Referenced by achannel_setting_slider_cb(), action_to_animdata(), ANIM_list_elem_update(), ANIM_remove_driver(), animdata_filter_base_is_ok(), animdata_keyframe_list_get(), animfilter_block_data(), animrecord_check_state(), animviz_calc_motionpaths(), BKE_animsys_eval_animdata(), BKE_animsys_eval_driver(), BKE_animsys_update_driver_array(), BKE_fcurve_find_by_rna_context_ui(), BKE_lib_override_library_property_is_animated(), BKE_library_id_can_use_filter_id(), blender::deg::DepsgraphNodeBuilder::build_animdata(), blender::deg::DepsgraphRelationBuilder::build_animdata_curves(), blender::deg::DepsgraphRelationBuilder::build_animdata_drivers(), blender::deg::DepsgraphRelationBuilder::build_copy_on_write_relations(), blender::deg::DepsgraphRelationBuilder::build_driver_relations(), clear_keyframe(), curve_is_animated(), curve_rename_fcurves(), delete_keyframe(), do_graph_region_driver_buttons(), do_version_hue_sat_node(), do_versions_after_linking_250(), do_versions_after_linking_300(), do_versions_ipos_to_animato(), draw_fcurve_curve(), ED_curve_updateAnimPaths(), ED_id_action_ensure(), expand_id(), gather_frames_to_render(), gather_frames_to_render_for_id(), blender::deg::graph_tag_ids_for_visible_update(), id_data_find_fcurve(), id_frame_has_keyframe(), insert_key_button_exec(), insert_keyframe(), ipo_to_animdata(), lib_link_id(), library_foreach_ID_link(), make_local_exec(), make_local_material_tag(), make_new_animlistelem(), mouse_nla_channels(), nlastrips_to_animdata(), poseAnim_mapping_refresh(), poselib_keytag_pose(), pyrna_struct_driver_add(), RE_RenderAnim(), remove_sequencer_fcurves(), seq_prefetch_frames(), seq_render_mask(), single_object_action_users(), single_objectdata_action_users(), tag_update_animation_element(), texture_slot_move_exec(), undocurve_from_editcurve(), undocurve_to_editcurve(), verify_driver_fcurve(), and version_liboverride_rnacollections_insertion_animdata().

◆ BKE_animdata_id_is_animated()

bool BKE_animdata_id_is_animated ( const struct ID id)

◆ BKE_animdata_merge_copy()

void BKE_animdata_merge_copy ( struct Main bmain,
struct ID dst_id,
struct ID src_id,
eAnimData_MergeCopy_Modes  action_mode,
bool  fix_drivers 
)

◆ BKE_animdata_set_action()

bool BKE_animdata_set_action ( struct ReportList reports,
struct ID id,
struct bAction act 
)

Set active action used by AnimData from the given ID-block.

Called when user tries to change the active action of an AnimData block (via RNA, Outliner, etc.)

Parameters
reportsCan be NULL.
idThe owner of the animation data
actThe Action to set, or NULL to clear.
Returns
true when the action was successfully updated, false otherwise.

Definition at line 118 of file anim_data.c.

References AnimData::action, BKE_animdata_action_editable(), BKE_animdata_action_ensure_idroot(), BKE_animdata_from_id(), BKE_report(), BKE_reportf(), id, bAction::id, id_us_min(), id_us_plus(), ID::name, NULL, RPT_ERROR, and RPT_WARNING.

Referenced by actionset_id_fn(), unlink_action_fn(), and unlinkact_animdata_fn().

◆ id_can_have_animdata()

bool id_can_have_animdata ( const struct ID id)

◆ id_type_can_have_animdata()

bool id_type_can_have_animdata ( short  id_type)

Check if the given ID-block can have AnimData.

Definition at line 57 of file anim_data.c.

References BKE_idtype_get_info_from_idcode(), IDTypeInfo::flags, IDTYPE_FLAGS_NO_ANIMDATA, and NULL.

Referenced by id_can_have_animdata(), and wm_context_member_from_ptr().