|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include <cstring>#include <optional>#include "ANIM_action.hh"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_context.hh"#include "BKE_fcurve.hh"#include "BKE_fcurve_driver.h"#include "BKE_global.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_main.hh"#include "BKE_nla.hh"#include "BKE_node.hh"#include "BKE_report.hh"#include "DNA_ID.h"#include "DNA_anim_types.h"#include "DNA_light_types.h"#include "DNA_material_types.h"#include "DNA_node_types.h"#include "DNA_space_types.h"#include "DNA_windowmanager_types.h"#include "DNA_world_types.h"#include "BLI_alloca.h"#include "BLI_dynstr.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "DEG_depsgraph.hh"#include "BLO_read_write.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "ANIM_action_iterators.hh"#include "ANIM_action_legacy.hh"#include "CLG_log.h"Go to the source code of this file.
Macros | |
| #define | ANIMDATA_IDS_CB(first) |
| #define | ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) |
Functions | |
| bool | id_type_can_have_animdata (const short id_type) |
| bool | id_can_have_animdata (const ID *id) |
| AnimData * | BKE_animdata_from_id (const ID *id) |
| AnimData * | BKE_animdata_ensure_id (ID *id) |
| static bool | animdata_set_action (ReportList *reports, ID *id, bAction **act_slot, bAction *act) |
| bool | BKE_animdata_set_tmpact (ReportList *reports, ID *id, bAction *act) |
| bool | BKE_animdata_set_action (ReportList *reports, ID *id, bAction *act) |
| bool | BKE_animdata_action_editable (const AnimData *adt) |
| bool | BKE_animdata_action_ensure_idroot (const ID *owner, bAction *action) |
| void | BKE_animdata_free (ID *id, const bool do_id_user) |
| bool | BKE_animdata_id_is_animated (const ID *id) |
| void | BKE_animdata_foreach_id (AnimData *adt, LibraryForeachIDData *data) |
| AnimData * | BKE_animdata_copy_in_lib (Main *bmain, std::optional< Library * > owner_library, AnimData *adt, const int flag) |
| AnimData * | BKE_animdata_copy (Main *bmain, AnimData *adt, const int flag) |
| bool | BKE_animdata_copy_id (Main *bmain, ID *id_to, ID *id_from, const int flag) |
| static void | animdata_copy_id_action (Main *bmain, ID *id, const bool set_newid, const bool do_linked_id) |
| void | BKE_animdata_copy_id_action (Main *bmain, ID *id) |
| void | BKE_animdata_duplicate_id_action (Main *bmain, ID *id, const uint duplicate_flags) |
| void | BKE_animdata_merge_copy (Main *bmain, ID *dst_id, ID *src_id, eAnimData_MergeCopy_Modes action_mode, bool fix_drivers) |
| static bool | animpath_matches_basepath (const char path[], const char basepath[]) |
| static void | animpath_update_basepath (FCurve *fcu, const char *old_basepath, const char *new_basepath) |
| static void | action_move_fcurves_by_basepath (bAction *srcAct, const animrig::slot_handle_t src_slot_handle, bAction *dstAct, const animrig::slot_handle_t dst_slot_handle, const char *src_basepath, const char *dst_basepath) |
| static void | animdata_move_drivers_by_basepath (AnimData *srcAdt, AnimData *dstAdt, const char *src_basepath, const char *dst_basepath) |
| void | BKE_animdata_transfer_by_basepath (Main *bmain, ID *srcID, ID *dstID, ListBase *basepaths) |
| static bool | check_rna_path_is_valid (ID *owner_id, const char *path) |
| static char * | rna_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, char *oldpath, bool verify_paths) |
| static bool | fcurves_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, const char *oldKey, const char *newKey, blender::Span< FCurve * > curves, bool verify_paths) |
| static bool | drivers_path_rename_fix (ID *owner_id, ID *ref_id, const char *prefix, const char *oldName, const char *newName, const char *oldKey, const char *newKey, ListBase *curves, bool verify_paths) |
| static bool | nlastrips_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, const char *oldKey, const char *newKey, ListBase *strips, bool verify_paths) |
| char * | BKE_animsys_fix_rna_path_rename (ID *owner_id, char *old_path, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths) |
| void | BKE_action_fix_paths_rename (ID *owner_id, bAction *act, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths) |
| void | BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths) |
| static bool | fcurves_path_remove_from_listbase (const char *prefix, ListBase *curves) |
| static bool | nlastrips_path_remove_fix (const char *prefix, ListBase *strips) |
| bool | BKE_animdata_fix_paths_remove (ID *id, const char *prefix) |
| static void | fcurves_apply_cb (ID *id, blender::Span< FCurve * > fcurves, const FunctionRef< void(ID *, FCurve *)> func) |
| static void | fcurves_listbase_apply_cb (ID *id, ListBase *fcurves, const FunctionRef< void(ID *, FCurve *)> func) |
| static void | nlastrips_apply_all_curves_cb (ID *id, ListBase *strips, const FunctionRef< void(ID *, FCurve *)> func) |
| static void | adt_apply_all_fcurves_cb (ID *id, AnimData *adt, const FunctionRef< void(ID *, FCurve *)> func) |
| void | BKE_fcurves_id_cb (ID *id, const FunctionRef< void(ID *, FCurve *)> func) |
| void | BKE_fcurves_main_cb (Main *bmain, const FunctionRef< void(ID *, FCurve *)> func) |
| void | BKE_animdata_main_cb (Main *bmain, const FunctionRef< void(ID *, AnimData *)> func) |
| void | BKE_animdata_fix_paths_rename_all (ID *ref_id, const char *prefix, const char *oldName, const char *newName) |
| void | BKE_animdata_fix_paths_rename_all_ex (Main *bmain, ID *ref_id, const char *prefix, const char *oldName, const char *newName, const int oldSubscript, const int newSubscript, const bool verify_paths) |
| void | BKE_animdata_blend_write (BlendWriter *writer, ID *id) |
| void | BKE_animdata_blend_read_data (BlendDataReader *reader, ID *id) |
| void | BKE_animdata_liboverride_post_process (ID *id) |
Variables | |
| static CLG_LogRef | LOG = {"bke.anim_sys"} |
| #define ANIMDATA_IDS_CB | ( | first | ) |
Referenced by BKE_animdata_main_cb().
| #define ANIMDATA_NODETREE_IDS_CB | ( | first, | |
| NtId_Type ) |
Referenced by BKE_animdata_main_cb().
|
static |
Definition at line 638 of file anim_data.cc.
References blender::animrig::action_fcurve_move(), animpath_matches_basepath(), animpath_update_basepath(), CLOG_ERROR, ELEM, blender::animrig::foreach_fcurve_in_action_slot(), G, G_DEBUG, LOG, and FCurve::rna_path.
Referenced by BKE_animdata_transfer_by_basepath().
|
static |
Definition at line 1281 of file anim_data.cc.
References AnimData::action, AnimData::drivers, blender::animrig::legacy::fcurves_all(), fcurves_apply_cb(), fcurves_listbase_apply_cb(), LISTBASE_FOREACH, AnimData::nla_tracks, nlastrips_apply_all_curves_cb(), and AnimData::tmpact.
Referenced by BKE_fcurves_id_cb(), and BKE_fcurves_main_cb().
|
static |
Definition at line 471 of file anim_data.cc.
References AnimData::action, animdata_copy_id_action(), BKE_animdata_from_id(), BKE_id_copy(), BLI_assert, BLI_assert_msg, bAction::id, bNodeTree::id, ID_IS_LINKED, ID_NEW_SET, blender::bke::node_tree_from_id(), AnimData::slot_handle, AnimData::tmp_slot_handle, AnimData::tmpact, and UNUSED_VARS_NDEBUG.
Referenced by animdata_copy_id_action(), BKE_animdata_copy_id_action(), and BKE_animdata_duplicate_id_action().
|
static |
Definition at line 678 of file anim_data.cc.
References animpath_matches_basepath(), animpath_update_basepath(), BLI_addtail(), BLI_remlink(), AnimData::drivers, and LISTBASE_FOREACH_MUTABLE.
Referenced by BKE_animdata_transfer_by_basepath().
|
static |
Definition at line 144 of file anim_data.cc.
References BKE_animdata_action_ensure_idroot(), BKE_reportf(), bAction::id, id_us_min(), id_us_plus(), ID::name, and RPT_ERROR.
Referenced by BKE_animdata_set_action(), and BKE_animdata_set_tmpact().
|
static |
Helper heuristic for determining if a path is compatible with the basepath
| path | Full RNA-path from some data (usually an F-Curve) to compare |
| basepath | Shorter path fragment to look for |
Definition at line 612 of file anim_data.cc.
References STRPREFIX.
Referenced by action_move_fcurves_by_basepath(), animdata_move_drivers_by_basepath(), and animpath_update_basepath().
|
static |
Definition at line 618 of file anim_data.cc.
References animpath_matches_basepath(), BLI_assert, BLI_sprintfN(), MEM_freeN(), FCurve::rna_path, and STREQ.
Referenced by action_move_fcurves_by_basepath(), and animdata_move_drivers_by_basepath().
| void BKE_action_fix_paths_rename | ( | struct ID * | owner_id, |
| struct bAction * | act, | ||
| const char * | prefix, | ||
| const char * | oldName, | ||
| const char * | newName, | ||
| int | oldSubscript, | ||
| int | newSubscript, | ||
| bool | verify_paths ) |
Fix all the paths for the given ID + Action.
This is just an external wrapper for the F-Curve fixing function, with input validity checks on top of the basic method.
<prefix><["><name><"]> i.e. pose.bones["Bone"]. Definition at line 1038 of file anim_data.cc.
References BLI_array_alloca, BLI_sprintfN(), BLI_str_escape(), ELEM, blender::animrig::legacy::fcurves_all(), fcurves_path_rename_fix(), and MEM_freeN().
Referenced by constraint_bone_name_fix(), and joined_armature_fix_links_constraints().
| bool BKE_animdata_action_editable | ( | const AnimData * | adt | ) |
Definition at line 224 of file anim_data.cc.
References AnimData::actstrip, ADT_NLA_EDIT_ON, AnimData::flag, and AnimData::tmpact.
Referenced by blender::animrig::assign_action(), and BKE_animdata_set_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.
Definition at line 232 of file anim_data.cc.
References blender::animrig::legacy::action_treat_as_legacy(), GS, bAction::idroot, and ID::name.
Referenced by animdata_set_action(), blender::animrig::generic_assign_action(), and what_does_obaction().
| void BKE_animdata_blend_read_data | ( | BlendDataReader * | reader, |
| ID * | id ) |
Definition at line 1482 of file anim_data.cc.
References AnimData::act_track, AnimData::actstrip, IdAdtTemplate::adt, BKE_fcurve_blend_read_data_listbase(), BKE_nla_blend_read_data(), BKE_nla_tweakmode_exit_nofollowptr(), BLO_read_struct, BLO_read_struct_list, AnimData::driver_array, AnimData::drivers, id_can_have_animdata(), ID_IS_LINKED, and AnimData::nla_tracks.
Referenced by direct_link_id_common().
| void BKE_animdata_blend_write | ( | BlendWriter * | writer, |
| ID * | id ) |
Definition at line 1455 of file anim_data.cc.
References BKE_animdata_from_id(), BKE_fcurve_blend_write_listbase(), BKE_nla_blend_write(), BLO_write_string(), BLO_write_struct, AnimData::drivers, LISTBASE_FOREACH, AnimData::nla_tracks, and AnimData::overrides.
Referenced by BKE_id_blend_write().
Make a copy of the given AnimData - to be used when copying data-blocks.
| flag | Control ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh. |
Definition at line 447 of file anim_data.cc.
References BKE_animdata_copy_in_lib(), and flag.
Referenced by BKE_animdata_copy_id(), and ED_armature_join_objects_exec().
| flag | Control ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh |
Definition at line 452 of file anim_data.cc.
References IdAdtTemplate::adt, BKE_animdata_copy(), BKE_animdata_free(), BKE_animdata_from_id(), flag, GS, LIB_ID_CREATE_NO_USER_REFCOUNT, and ID::name.
Referenced by blender::ed::object::make_links_data_exec().
Copy AnimData Actions.
Definition at line 515 of file anim_data.cc.
References animdata_copy_id_action(), and ID_IS_OVERRIDE_LIBRARY.
| AnimData * BKE_animdata_copy_in_lib | ( | Main * | bmain, |
| std::optional< Library * > | owner_library, | ||
| AnimData * | adt, | ||
| int | flag ) |
Same as BKE_animdata_copy, but allows to duplicate Action IDs into a library.
| owner_library | the Library to 'assign' the newly created ID to. Use nullptr to make ID not use any library (i.e. become a local ID). Use std::nullopt for default behavior (i.e. behavior of the BKE_animdata_copy function). |
Definition at line 364 of file anim_data.cc.
References AnimData::action, BKE_fcurves_copy(), BKE_id_copy_in_lib(), BKE_nla_tracks_copy_from_adt(), BLI_assert, BLI_listbase_clear(), AnimData::driver_array, AnimData::drivers, flag, id_us_plus(), LIB_ID_COPY_ACTIONS, LIB_ID_CREATE_NO_MAIN, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN, AnimData::overrides, AnimData::tmpact, and blender::animrig::Slot::users_invalidate().
Referenced by BKE_animdata_copy(), BKE_libblock_copy_in_lib(), and blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil().
Definition at line 521 of file anim_data.cc.
References animdata_copy_id_action(), USER_DUP_ACT, and USER_DUP_LINKED_ID.
Referenced by BKE_id_copy_for_duplicate(), BKE_scene_duplicate(), blender::ed::object::single_object_action_users(), and blender::ed::object::single_objectdata_action_users().
Ensure AnimData exists in the given ID-block (when supported).
Definition at line 103 of file anim_data.cc.
References AnimData::act_influence, IdAdtTemplate::adt, id_can_have_animdata(), and MEM_callocN.
Referenced by blender::animrig::assign_action(), BKE_animdata_set_action(), BKE_animdata_transfer_by_basepath(), do_versions_ipos_to_animato(), blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize(), blender::animrig::id_action_ensure(), blender::animrig::insert_keyframes(), merge_actions_selection_exec(), nlaedit_objects_add_exec(), blender::ed::object::object_speaker_add_exec(), blender::interface::internal::paste_property_drivers(), sequencer_write_copy_paste_file(), blender::animrig::tests::KeyframingTest::SetUp(), blender::interface::tests::CopyDriversToSelected::SetUp(), blender::animrig::nla::tests::TEST_F(), blender::animrig::nla::tests::TEST_F(), blender::animrig::tests::TEST_F(), and verify_driver_fcurve().
| bool BKE_animdata_fix_paths_remove | ( | struct ID * | id, |
| const char * | prefix ) |
Remove any animation data (F-Curves from Actions, and drivers) that have an RNA path starting with prefix.
Return true if any animation data was affected.
Definition at line 1214 of file anim_data.cc.
References AnimData::action, blender::animrig::legacy::action_fcurves_remove(), BKE_animdata_from_id(), AnimData::drivers, fcurves_path_remove_from_listbase(), LISTBASE_FOREACH, AnimData::nla_tracks, nlastrips_path_remove_fix(), AnimData::slot_handle, AnimData::tmp_slot_handle, and AnimData::tmpact.
Referenced by clip_delete_plane_track(), clip_delete_track(), blender::bke::node_remove_node(), and version_principled_bsdf_update_animdata().
| void BKE_animdata_fix_paths_rename | ( | struct ID * | owner_id, |
| struct AnimData * | adt, | ||
| struct ID * | ref_id, | ||
| const char * | prefix, | ||
| const char * | oldName, | ||
| const char * | newName, | ||
| int | oldSubscript, | ||
| int | newSubscript, | ||
| bool | verify_paths ) |
Fix all the paths for the given ID+AnimData
<prefix><["><name><"]> i.e. pose.bones["Bone"]. Definition at line 1089 of file anim_data.cc.
References AnimData::action, BLI_array_alloca, BLI_sprintfN(), BLI_str_escape(), DEG_id_tag_update(), AnimData::drivers, drivers_path_rename_fix(), ELEM, blender::animrig::legacy::fcurves_all(), fcurves_path_rename_fix(), bAction::id, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, MEM_freeN(), AnimData::nla_tracks, nlastrips_path_rename_fix(), and AnimData::tmpact.
Referenced by BKE_animdata_fix_paths_rename_all_ex(), SEQ_ensure_unique_name(), texture_slot_move_exec(), and version_principled_bsdf_update_animdata().
| void BKE_animdata_fix_paths_rename_all | ( | struct ID * | ref_id, |
| const char * | prefix, | ||
| const char * | oldName, | ||
| const char * | newName ) |
See BKE_animdata_fix_paths_rename_all_ex
Definition at line 1429 of file anim_data.cc.
References BKE_animdata_fix_paths_rename_all_ex(), and G.
Referenced by ANIM_armature_bonecoll_name_set(), BKE_mask_layer_rename(), BKE_view_layer_rename(), and ED_armature_bone_rename().
| void BKE_animdata_fix_paths_rename_all_ex | ( | struct Main * | bmain, |
| struct ID * | ref_id, | ||
| const char * | prefix, | ||
| const char * | oldName, | ||
| const char * | newName, | ||
| int | oldSubscript, | ||
| int | newSubscript, | ||
| bool | verify_paths ) |
Fix all RNA-Paths throughout the database (directly access the Global.main version).
<prefix><["><name><"]> i.e. pose.bones["Bone"] Definition at line 1438 of file anim_data.cc.
References BKE_animdata_fix_paths_rename(), and BKE_animdata_main_cb().
Referenced by BKE_animdata_fix_paths_rename_all(), and version_node_socket_index_animdata().
| void BKE_animdata_foreach_id | ( | AnimData * | adt, |
| LibraryForeachIDData * | data ) |
Callback used by lib_query to walk over all ID usages (mimics foreach_id callback of IDTypeInfo structure).
Definition at line 346 of file anim_data.cc.
References AnimData::action, BKE_fcurve_foreach_id(), BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_nla_strip_foreach_id(), AnimData::drivers, IDWALK_CB_USER, LISTBASE_FOREACH, AnimData::nla_tracks, NlaStrip::strips, and AnimData::tmpact.
Referenced by library_foreach_ID_link().
| void BKE_animdata_free | ( | ID * | id, |
| bool | do_id_user ) |
Free AnimData used by the nominated ID-block, and clear ID-block's AnimData pointer.
Definition at line 263 of file anim_data.cc.
References AnimData::action, IdAdtTemplate::adt, blender::animrig::assign_tmpaction(), BKE_fcurves_free(), BKE_nla_tracks_free(), BKE_nla_tweakmode_exit(), BLI_assert_msg, BLI_assert_unreachable, AnimData::driver_array, AnimData::drivers, bAction::id, id_can_have_animdata(), id_us_min(), MEM_freeN(), MEM_SAFE_FREE, AnimData::nla_tracks, AnimData::tmpact, blender::animrig::unassign_action(), and UNUSED_VARS_NDEBUG.
Referenced by animchannels_clean_empty_exec(), BKE_animdata_copy_id(), BKE_libblock_free_data(), blender::ed::outliner::clear_animdata_fn(), curves_free_data(), grease_pencil_free_data(), blender::ed::object::make_object_duplilist_real(), blender::bke::node_tree_free_tree(), pointcloud_free_data(), and volume_free_data().
Get AnimData from the given ID-block.
Definition at line 89 of file anim_data.cc.
References IdAdtTemplate::adt, and id_can_have_animdata().
Referenced by achannel_setting_slider_cb(), action_to_animdata(), ANIM_list_elem_update(), ANIM_remove_driver(), animdata_copy_id_action(), animdata_filter_base_is_ok(), animfilter_block_data(), animrecord_check_state(), animviz_calc_motionpaths(), blender::animrig::assign_action_ensure_slot_for_keying(), blender::animrig::assign_action_slot(), BKE_animdata_blend_write(), BKE_animdata_copy_id(), BKE_animdata_fix_paths_remove(), BKE_animdata_id_is_animated(), BKE_animdata_liboverride_post_process(), BKE_animdata_merge_copy(), BKE_animdata_set_action(), BKE_animdata_set_tmpact(), BKE_animdata_transfer_by_basepath(), BKE_animsys_eval_animdata(), BKE_animsys_eval_driver(), BKE_animsys_update_driver_array(), BKE_fcurve_find_by_rna_context_ui(), BKE_fcurves_id_cb(), BKE_lib_override_library_property_is_animated(), BKE_library_id_can_use_filter_id(), BKE_nla_debug_print_flags(), 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(), calculate_fcurve_bounds_and_unhide(), blender::animrig::clear_keyframe(), convert_action_exec(), convert_action_poll(), curve_is_animated(), blender::animrig::delete_keyframe(), do_graph_region_driver_buttons(), do_version_hue_sat_node(), do_versions_after_linking_250(), do_versions_after_linking_300(), do_versions_after_linking_400(), do_versions_ipos_to_animato(), draw_fcurve_curve(), ED_curve_updateAnimPaths(), blender::ed::outliner::TreeElementID::expand(), blender::animrig::Action::find_suitable_slot_for(), blender::animrig::foreach_action_slot_use_with_references(), blender::bke::nla::foreach_strip(), gather_frames_to_render(), gather_frames_to_render_for_id(), blender::animrig::get_action(), blender::animrig::get_action_slot_pair(), get_fcurves_of_property(), blender::interface::internal::get_property_drivers(), blender::ed::greasepencil::get_selected_object_keyframes(), blender::deg::graph_tag_ids_for_visible_update(), id_data_find_fcurve(), id_frame_has_keyframe(), insert_key_button_exec(), ipo_to_animdata(), blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil(), blender::bke::greasepencil::convert::legacy_object_modifier_common(), blender::bke::greasepencil::convert::legacy_object_thickness_modifier_thickness_anim(), library_foreach_ID_link(), blender::ed::object::make_local_exec(), blender::ed::object::make_local_material_tag(), make_new_animlistelem(), mouse_nla_tracks(), nlastrip_shuffle_transformed(), nlastrips_to_animdata(), poseAnim_mapping_refresh(), poselib_keytag_pose(), pyrna_struct_driver_add(), RE_RenderAnim(), recalcData_nla(), remove_sequencer_fcurves(), RNA_property_anim_editable(), RNA_property_driver_editable(), seq_prefetch_frames(), seq_render_mask(), blender::ed::object::single_object_action_users(), blender::ed::object::single_objectdata_action_users(), blender::animrig::Action::slot_name_propagate(), tag_update_animation_element(), texture_slot_move_exec(), transdata_get_track_shuffle_offset_side(), uiTemplateAction(), undocurve_from_editcurve(), undocurve_to_editcurve(), verify_driver_fcurve(), version_liboverride_rnacollections_insertion_animdata(), version_nla_action_strip_hold(), version_nla_tweakmode_incomplete(), and version_principled_bsdf_update_animdata().
| bool BKE_animdata_id_is_animated | ( | const ID * | id | ) |
Return true if the ID-block has non-empty AnimData.
Definition at line 321 of file anim_data.cc.
References AnimData::action, BKE_animdata_from_id(), BLI_listbase_is_empty(), bAction::curves, AnimData::drivers, blender::animrig::Action::is_action_layered(), blender::animrig::Action::is_action_legacy(), blender::animrig::Action::is_slot_animated(), AnimData::nla_tracks, AnimData::overrides, and AnimData::slot_handle.
Referenced by BKE_object_moves_in_time(), calculate_selection_fcurve_bounds(), and blender::io::AbstractHierarchyWriter::check_is_animated().
| void BKE_animdata_liboverride_post_process | ( | ID * | id | ) |
Process the AnimData struct after all library overrides have been applied.
This is necessary as an extra step to fix the NLA, as that requires multiple pointers & various sets of flags to all be consistent. It's much easier to do that once all overrides have been applied.
Definition at line 1521 of file anim_data.cc.
References BKE_animdata_from_id(), and BKE_nla_liboverride_post_process().
Referenced by BKE_lib_override_library_update().
| void BKE_animdata_main_cb | ( | Main * | bmain, |
| const FunctionRef< void(ID *, AnimData *)> | func ) |
Definition at line 1319 of file anim_data.cc.
References ANIMDATA_IDS_CB, ANIMDATA_NODETREE_IDS_CB, Main::armatures, Main::cachefiles, Main::cameras, Main::curves, ListBase::first, Main::gpencils, Main::grease_pencils, Main::hair_curves, Main::lattices, Main::lights, Main::linestyles, Main::masks, Main::materials, Main::meshes, Main::metaballs, Main::movieclips, Main::nodetrees, Main::objects, Main::palettes, Main::particles, Main::pointclouds, Main::scenes, Main::shapekeys, Main::speakers, Main::textures, Main::volumes, and Main::worlds.
Referenced by BKE_animdata_fix_paths_rename_all_ex(), and BKE_fcurves_main_cb().
| void BKE_animdata_merge_copy | ( | Main * | bmain, |
| ID * | dst_id, | ||
| ID * | src_id, | ||
| eAnimData_MergeCopy_Modes | action_mode, | ||
| bool | fix_drivers ) |
Merge copies of the data from the src AnimData into the destination AnimData.
Definition at line 530 of file anim_data.cc.
References AnimData::action, ADT_MERGECOPY_SRC_COPY, ADT_MERGECOPY_SRC_REF, ADT_NLA_EDIT_ON, BKE_animdata_from_id(), BKE_fcurves_copy(), BKE_id_copy(), BKE_nla_tracks_copy(), BLI_movelisttolist(), CLOG_ERROR, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER_BEGIN, AnimData::drivers, ELEM, ListBase::first, AnimData::flag, bAction::id, id_us_plus(), LISTBASE_FOREACH, LOG, AnimData::nla_tracks, AnimData::slot_handle, AnimData::slot_name, STRNCPY, AnimData::tmp_slot_handle, AnimData::tmp_slot_name, AnimData::tmpact, and ChannelDriver::variables.
Referenced by ED_armature_join_objects_exec().
| bool BKE_animdata_set_action | ( | ReportList * | reports, |
| ID * | id, | ||
| 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.)
| reports | Can be NULL. |
| id | The owner of the animation data |
| act | The Action to set, or NULL to clear. |
Definition at line 194 of file anim_data.cc.
References AnimData::action, animdata_set_action(), blender::animrig::assign_action(), BKE_animdata_action_editable(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BKE_report(), RPT_ERROR, and RPT_WARNING.
Referenced by blender::ed::outliner::actionset_id_fn(), blender::ed::outliner::unlink_action_fn(), and blender::ed::outliner::unlinkact_animdata_fn().
| bool BKE_animdata_set_tmpact | ( | ReportList * | reports, |
| ID * | id, | ||
| bAction * | act ) |
Same as BKE_animdata_set_action(), except sets tmpact instead of action.
Definition at line 181 of file anim_data.cc.
References animdata_set_action(), BKE_animdata_from_id(), BKE_report(), RPT_WARNING, and AnimData::tmpact.
| void BKE_animdata_transfer_by_basepath | ( | struct Main * | bmain, |
| struct ID * | srcID, | ||
| struct ID * | dstID, | ||
| struct ListBase * | basepaths ) |
Move animation data from source to destination if its paths are based on basepaths.
Transfer the animation data from srcID to dstID where the srcID animation data is based off basepath, creating new AnimData and associated data as necessary.
| basepaths | A list of AnimationBasePathChange. |
Definition at line 694 of file anim_data.cc.
References AnimData::action, blender::animrig::action_add(), action_move_fcurves_by_basepath(), animdata_move_drivers_by_basepath(), blender::animrig::assign_action(), BKE_animdata_ensure_id(), BKE_animdata_from_id(), BLI_assert, BLI_assert_msg, CLOG_ERROR, CLOG_WARN, DEG_id_tag_update(), AnimData::drivers, ELEM, ListBase::first, G, G_DEBUG, bAction::id, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, LOG, ID::name, blender::animrig::Action::slot_add_for_id(), AnimData::slot_handle, blender::animrig::unassign_action(), blender::animrig::Slot::unassigned, UNUSED_VARS_NDEBUG, and USER_EXPERIMENTAL_TEST.
Referenced by blender::ed::space_node::node_group_make_insert_selected(), blender::ed::space_node::node_group_separate_selected(), and blender::ed::space_node::node_group_ungroup().
| char * BKE_animsys_fix_rna_path_rename | ( | struct ID * | owner_id, |
| char * | old_path, | ||
| const char * | prefix, | ||
| const char * | oldName, | ||
| const char * | newName, | ||
| int | oldSubscript, | ||
| int | newSubscript, | ||
| bool | verify_paths ) |
Get a "fixed" version of the given path old_path.
This is just an external wrapper for the RNA-Path fixing function, with input validity checks on top of the basic method.
<prefix><["><name><"]> i.e. pose.bones["Bone"]. Definition at line 981 of file anim_data.cc.
References BLI_array_alloca, BLI_sprintfN(), BLI_str_escape(), CLOG_WARN, ELEM, G, G_DEBUG, LOG, MEM_freeN(), printf, result, and rna_path_rename_fix().
Referenced by joined_armature_fix_animdata_cb().
| void BKE_fcurves_id_cb | ( | ID * | id, |
| const FunctionRef< void(ID *, FCurve *)> | func ) |
Definition at line 1302 of file anim_data.cc.
References adt_apply_all_fcurves_cb(), and BKE_animdata_from_id().
| void BKE_fcurves_main_cb | ( | Main * | bmain, |
| const FunctionRef< void(ID *, FCurve *)> | func ) |
Definition at line 1310 of file anim_data.cc.
References adt_apply_all_fcurves_cb(), and BKE_animdata_main_cb().
|
static |
Definition at line 775 of file anim_data.cc.
References ptr, RNA_id_pointer_create(), and RNA_path_resolve_property().
Referenced by rna_path_rename_fix().
|
static |
Definition at line 890 of file anim_data.cc.
References DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER_BEGIN, GS, ID_OB, LISTBASE_FOREACH, rna_path_rename_fix(), STREQ, STRNCPY, and ChannelDriver::variables.
Referenced by BKE_animdata_fix_paths_rename().
|
static |
Definition at line 1246 of file anim_data.cc.
Referenced by adt_apply_all_fcurves_cb(), and nlastrips_apply_all_curves_cb().
|
static |
Definition at line 1254 of file anim_data.cc.
References LISTBASE_FOREACH.
Referenced by adt_apply_all_fcurves_cb().
|
static |
Remove F-Curves from the listbase when their RNA path starts with prefix.
Definition at line 1171 of file anim_data.cc.
References BKE_fcurve_free(), BLI_remlink(), FCurve::next, FCurve::rna_path, and STRPREFIX.
Referenced by BKE_animdata_fix_paths_remove().
|
static |
Definition at line 856 of file anim_data.cc.
References bActionGroup::name, rna_path_rename_fix(), STREQ, and STRNCPY.
Referenced by BKE_action_fix_paths_rename(), BKE_animdata_fix_paths_rename(), and nlastrips_path_rename_fix().
| bool id_can_have_animdata | ( | const ID * | id | ) |
Definition at line 79 of file anim_data.cc.
References GS, and id_type_can_have_animdata().
Referenced by BKE_animdata_blend_read_data(), BKE_animdata_ensure_id(), BKE_animdata_free(), BKE_animdata_from_id(), BKE_libblock_copy_in_lib(), insert_key(), blender::animrig::internal::rebuild_slot_user_cache(), RNA_property_animateable(), blender::animrig::Action::slot_name_propagate(), and uiTemplateAction().
| bool id_type_can_have_animdata | ( | short | id_type | ) |
Check if the given ID-block can have AnimData.
Definition at line 70 of file anim_data.cc.
References BKE_idtype_get_info_from_idcode(), IDTypeInfo::flags, and IDTYPE_FLAGS_NO_ANIMDATA.
Referenced by id_can_have_animdata(), blender::animrig::internal::rebuild_slot_user_cache(), and wm_context_member_from_ptr().
|
static |
Definition at line 1265 of file anim_data.cc.
References blender::animrig::legacy::fcurves_all(), fcurves_apply_cb(), LISTBASE_FOREACH, and nlastrips_apply_all_curves_cb().
Referenced by adt_apply_all_fcurves_cb(), and nlastrips_apply_all_curves_cb().
|
static |
Definition at line 1195 of file anim_data.cc.
References blender::animrig::legacy::action_fcurves_remove(), LISTBASE_FOREACH, and nlastrips_path_remove_fix().
Referenced by BKE_animdata_fix_paths_remove(), and nlastrips_path_remove_fix().
|
static |
Definition at line 943 of file anim_data.cc.
References DEG_id_tag_update(), blender::animrig::legacy::fcurves_all(), fcurves_path_rename_fix(), ID_RECALC_ANIMATION, LISTBASE_FOREACH, and nlastrips_path_rename_fix().
Referenced by BKE_animdata_fix_paths_rename(), and nlastrips_path_rename_fix().
|
static |
Definition at line 790 of file anim_data.cc.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_nappend(), BLI_dynstr_new(), check_rna_path_is_valid(), and MEM_freeN().
Referenced by BKE_animsys_fix_rna_path_rename(), drivers_path_rename_fix(), and fcurves_path_rename_fix().
|
static |
Definition at line 61 of file anim_data.cc.
Referenced by action_move_fcurves_by_basepath(), BKE_animdata_merge_copy(), BKE_animdata_transfer_by_basepath(), and BKE_animsys_fix_rna_path_rename().