|
Blender
V2.93
|
#include <float.h>#include <math.h>#include <stddef.h>#include <stdio.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_utildefines.h"#include "DNA_anim_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_animsys.h"#include "BKE_context.h"#include "BKE_main.h"#include "BKE_report.h"#include "DEG_depsgraph.h"#include "ED_keyframing.h"#include "ED_screen.h"#include "UI_interface.h"#include "UI_resources.h"#include "WM_api.h"#include "WM_types.h"#include "RNA_access.h"#include "RNA_define.h"#include "RNA_enum_types.h"#include "anim_intern.h"Go to the source code of this file.
Classes | |
| struct | tRKS_DSource |
Macros | |
| #define | APPLY_KEYINGFLAG_OVERRIDE(kflag) |
Typedefs | |
| typedef struct tRKS_DSource | tRKS_DSource |
Variables | |
| static ListBase | keyingset_type_infos = {NULL, NULL} |
| ListBase | builtin_keyingsets = {NULL, NULL} |
| #define APPLY_KEYINGFLAG_OVERRIDE | ( | kflag | ) |
| typedef struct tRKS_DSource tRKS_DSource |
|
static |
Definition at line 108 of file keyingsets.c.
References Scene::active_keyingset, ANIM_get_keyframing_flags(), BKE_keyingset_add(), BLI_listbase_count(), C, CTX_data_scene(), KEYINGSET_ABSOLUTE, Scene::keyingsets, NC_SCENE, ND_KEYINGSET, NULL, OPERATOR_FINISHED, scene, and WM_event_add_notifier().
Referenced by ANIM_OT_keying_set_add().
|
static |
Definition at line 195 of file keyingsets.c.
References Scene::active_keyingset, KeyingSet::active_path, BKE_report(), BLI_addtail(), BLI_findlink(), BLI_listbase_count(), C, CTX_data_scene(), KS_Path::flag, KS_Path::groupmode, ID_OB, KS_Path::idtype, Scene::keyingsets, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_KSNAME, MEM_callocN, OPERATOR_CANCELLED, OPERATOR_FINISHED, KeyingSet::paths, wmOperator::reports, RPT_ERROR, and scene.
Referenced by ANIM_OT_keying_set_path_add().
|
static |
Definition at line 284 of file keyingsets.c.
References Scene::active_keyingset, KeyingSet::active_path, all(), ANIM_get_keyframing_flags(), BKE_keyingset_add(), BKE_keyingset_add_path(), BKE_report(), BKE_reportf(), BLI_findlink(), BLI_listbase_count(), C, CTX_data_scene(), PointerRNA::data, INSERTKEY_XYZ2RGB, IS_AUTOKEY_FLAG, KEYINGSET_ABSOLUTE, Scene::keyingsets, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_KSNAME, MEM_freeN, KeyingSet::name, NC_SCENE, ND_KEYINGSET, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, PointerRNA::owner_id, KeyingSet::paths, wmOperator::ptr, ptr, wmOperator::reports, RNA_boolean_get(), RNA_path_from_ID_to_property(), RNA_property_animateable(), RPT_ERROR, RPT_INFO, scene, UI_context_active_but_prop_get(), and WM_event_add_notifier().
Referenced by ANIM_OT_keyingset_button_add().
| int ANIM_apply_keyingset | ( | bContext * | C, |
| ListBase * | dsources, | ||
| bAction * | act, | ||
| KeyingSet * | ks, | ||
| short | mode, | ||
| float | cfra | ||
| ) |
Given a KeyingSet and context info (if required), modify keyframes for the channels specified by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.
Definition at line 1028 of file keyingsets.c.
References ANIM_get_keyframing_flags(), ANIM_validate_keyingset(), KS_Path::array_index, BKE_animsys_eval_context_construct(), BKE_animsys_free_nla_keyframing_context_cache(), BKE_reportf(), BLI_assert, C, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_reports(), DEG_id_tag_update(), delete_keyframe(), depsgraph, error(), ListBase::first, KS_Path::flag, KS_Path::group, KS_Path::groupmode, GS, KS_Path::id, Object::id, ID_OB, ID_RECALC_ANIMATION_NO_FLUSH, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, insert_keyframe(), ToolSettings::keyframe_type, KS_Path::keyingflag, KeyingSet::keyingflag, KS_Path::keyingoverride, KeyingSet::keyingoverride, keyingset_apply_keying_flags(), KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_KSNAME, KSP_GROUP_NONE, MODIFYKEY_MODE_DELETE, MODIFYKEY_MODE_INSERT, NA_ADDED, KeyingSet::name, ID::name, NC_ANIMATION, ND_KEYFRAME, KS_Path::next, NULL, KeyingSet::paths, ptr, RNA_id_pointer_create(), KS_Path::rna_path, RNA_path_resolve_property(), RNA_property_array_length(), RPT_WARNING, scene, Scene::toolsettings, and WM_main_add_notifier().
Referenced by autokeyframe_object(), autokeyframe_pose(), delete_key_exec(), ED_autokeyframe_object(), ED_autokeyframe_pchan(), ED_view3d_camera_autokey(), insert_key_exec(), pose_clear_transform_generic_exec(), poseAnim_mapping_autoKeyframe(), poselib_add_exec(), and poselib_keytag_pose().
Definition at line 550 of file keyingsets.c.
References builtin_keyingsets, ListBase::first, KeyingSet::idname, KeyingSet::next, NULL, and STREQ.
Referenced by ANIM_get_keyingset_for_autokeying(), autokeyframe_object(), autokeyframe_pose(), pose_flip_quats_exec(), and poselib_add_exec().
Definition at line 725 of file keyingsets.c.
References Scene::active_keyingset, ANIM_builtin_keyingset_get_named(), ANIM_KS_AVAILABLE_ID, ANIM_scene_get_active_keyingset(), IS_AUTOKEY_FLAG, NULL, and scene.
Referenced by ED_view3d_camera_autokey(), object_clear_transform_generic_exec(), pose_clear_transform_generic_exec(), pose_paste_exec(), poseAnim_mapping_autoKeyframe(), poselib_keytag_pose(), snap_sel_to_grid_exec(), and snap_selected_to_location().
| const EnumPropertyItem* ANIM_keying_sets_enum_itemf | ( | bContext * | C, |
| PointerRNA * | UNUSEDptr, | ||
| PropertyRNA * | UNUSEDprop, | ||
| bool * | r_free | ||
| ) |
Definition at line 743 of file keyingsets.c.
References Scene::active_keyingset, ANIM_keyingset_context_ok_poll(), builtin_keyingsets, C, CTX_data_scene(), KeyingSet::description, DummyRNA_DEFAULT_items, ListBase::first, EnumPropertyItem::identifier, KeyingSet::idname, Scene::keyingsets, KeyingSet::name, KeyingSet::next, NULL, RNA_enum_item_add(), RNA_enum_item_add_separator(), RNA_enum_item_end(), and scene.
Referenced by ANIM_OT_keyframe_delete(), ANIM_OT_keyframe_insert(), ANIM_OT_keyframe_insert_menu(), and ANIM_OT_keying_set_active_set().
Definition at line 851 of file keyingsets.c.
References ANIM_keyingset_info_find_name(), C, KeyingSet::flag, KEYINGSET_ABSOLUTE, NULL, KeyingSetInfo::poll, and KeyingSet::typeinfo.
Referenced by ANIM_keying_sets_enum_itemf().
Definition at line 658 of file keyingsets.c.
References BLI_findptr(), ELEM, NULL, and KeyingSet::paths.
Referenced by insert_key_exec().
Get the keying set from enum values generated in ANIM_keying_sets_enum_itemf.
Type is the Keying Set the user specified to use when calling the operator:
Definition at line 819 of file keyingsets.c.
References Scene::active_keyingset, BLI_findlink(), builtin_keyingsets, Scene::keyingsets, NULL, scene, and type.
Referenced by delete_key_exec(), and keyingset_get_from_op_with_error().
Definition at line 836 of file keyingsets.c.
References BLI_findstring(), builtin_keyingsets, Scene::keyingsets, NULL, and scene.
Referenced by delete_key_exec(), and keyingset_get_from_op_with_error().
| KeyingSetInfo* ANIM_keyingset_info_find_name | ( | const char | name[] | ) |
Definition at line 538 of file keyingsets.c.
References BLI_findstring(), keyingset_type_infos, and NULL.
Referenced by ANIM_keyingset_context_ok_poll(), and ANIM_validate_keyingset().
| void ANIM_keyingset_info_register | ( | KeyingSetInfo * | ksi | ) |
Definition at line 587 of file keyingsets.c.
References BKE_keyingset_add(), BLI_addtail(), BLI_strncpy(), builtin_keyingsets, KeyingSetInfo::description, KeyingSet::description, KeyingSetInfo::idname, KeyingSetInfo::keyingflag, keyingset_type_infos, KeyingSetInfo::name, and KeyingSet::typeinfo.
| void ANIM_keyingset_info_unregister | ( | Main * | bmain, |
| KeyingSetInfo * | ksi | ||
| ) |
Definition at line 608 of file keyingsets.c.
References BKE_keyingset_free(), BLI_freelinkN(), BLI_remlink(), BLI_remlink_safe(), builtin_keyingsets, ListBase::first, Scene::id, KeyingSetInfo::idname, keyingset_type_infos, Scene::keyingsets, MEM_freeN, KeyingSet::next, ID::next, scene, Main::scenes, STREQ, and KeyingSet::typeinfo.
| void ANIM_keyingset_infos_exit | ( | void | ) |
Definition at line 638 of file keyingsets.c.
References BKE_keyingsets_free(), BLI_freelinkN(), builtin_keyingsets, ExtensionRNA::data, ListBase::first, ExtensionRNA::free, keyingset_type_infos, KeyingSetInfo::next, next, and KeyingSetInfo::rna_ext.
Referenced by WM_exit_ex().
| void ANIM_OT_keying_set_active_set | ( | wmOperatorType * | ot | ) |
Definition at line 502 of file keyingsets.c.
References ANIM_keying_sets_enum_itemf(), wmOperatorType::description, DummyRNA_DEFAULT_items, ED_operator_areaactive(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, keyingset_active_menu_exec(), keyingset_active_menu_invoke(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), RNA_def_enum_funcs(), and wmOperatorType::srna.
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keying_set_add | ( | wmOperatorType * | ot | ) |
Definition at line 133 of file keyingsets.c.
References add_default_keyingset_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, keyingset_poll_default_add(), wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keying_set_path_add | ( | wmOperatorType * | ot | ) |
Definition at line 224 of file keyingsets.c.
References add_empty_ks_path_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, keyingset_poll_active_edit(), wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keying_set_path_remove | ( | wmOperatorType * | ot | ) |
Definition at line 267 of file keyingsets.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, keyingset_poll_activePath_edit(), wmOperatorType::name, ot, wmOperatorType::poll, and remove_active_ks_path_exec().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keying_set_remove | ( | wmOperatorType * | ot | ) |
Definition at line 181 of file keyingsets.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, keyingset_poll_active_edit(), wmOperatorType::name, ot, wmOperatorType::poll, and remove_active_keyingset_exec().
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyingset_button_add | ( | wmOperatorType * | ot | ) |
Definition at line 371 of file keyingsets.c.
References add_keyingset_button_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_anim().
| void ANIM_OT_keyingset_button_remove | ( | wmOperatorType * | ot | ) |
Definition at line 453 of file keyingsets.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and remove_keyingset_button_exec().
Referenced by ED_operatortypes_anim().
| void ANIM_relative_keyingset_add_source | ( | ListBase * | dsources, |
| ID * | id, | ||
| StructRNA * | srna, | ||
| void * | data | ||
| ) |
Definition at line 898 of file keyingsets.c.
References BLI_addtail(), data, ELEM, MEM_callocN, NULL, tRKS_DSource::ptr, RNA_id_pointer_create(), and RNA_pointer_create().
Referenced by autokeyframe_object(), autokeyframe_pose(), ED_autokeyframe_object(), ED_autokeyframe_pchan(), ED_view3d_camera_autokey(), pose_clear_transform_generic_exec(), poseAnim_mapping_autoKeyframe(), and poselib_keytag_pose().
Definition at line 674 of file keyingsets.c.
References Scene::active_keyingset, BLI_findlink(), builtin_keyingsets, Scene::keyingsets, NULL, and scene.
Referenced by ANIM_get_keyingset_for_autokeying(), autokeyframe_object(), autokeyframe_pose(), pose_select_same_keyingset(), and select_grouped_keyingset().
Definition at line 693 of file keyingsets.c.
References BLI_findindex(), builtin_keyingsets, Scene::keyingsets, NULL, and scene.
| eModifyKey_Returns ANIM_validate_keyingset | ( | bContext * | C, |
| ListBase * | dsources, | ||
| KeyingSet * | ks | ||
| ) |
Given a KeyingSet and context info, validate Keying Set's paths. This is only really necessary with relative/built-in KeyingSets where their list of paths is dynamically generated based on the current context info.
Returns 0 if succeeded, otherwise an error code: eModifyKey_Returns
Definition at line 936 of file keyingsets.c.
References ANIM_keyingset_info_find_name(), BKE_keyingset_free(), BLI_listbase_is_empty(), C, KeyingSet::flag, KeyingSetInfo::iter, KEYINGSET_ABSOLUTE, MODIFYKEY_INVALID_CONTEXT, MODIFYKEY_MISSING_TYPEINFO, NULL, KeyingSet::paths, KeyingSetInfo::poll, RKS_ITER_overrides_list(), and KeyingSet::typeinfo.
Referenced by ANIM_apply_keyingset(), pose_select_same_keyingset(), and select_grouped_keyingset().
|
static |
Definition at line 488 of file keyingsets.c.
References Scene::active_keyingset, C, CTX_data_scene(), NC_SCENE, ND_KEYINGSET, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), scene, type, and WM_event_add_notifier().
Referenced by ANIM_OT_keying_set_active_set().
|
static |
Definition at line 474 of file keyingsets.c.
References C, wmOperatorType::name, OPERATOR_INTERFACE, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemsEnumO().
Referenced by ANIM_OT_keying_set_active_set().
|
static |
Definition at line 989 of file keyingsets.c.
References APPLY_KEYINGFLAG_OVERRIDE, INSERTKEY_MATRIX, INSERTKEY_NEEDED, INSERTKEY_XYZ2RGB, and result.
Referenced by ANIM_apply_keyingset().
|
static |
Definition at line 75 of file keyingsets.c.
References Scene::active_keyingset, C, CTX_data_scene(), ListBase::first, Scene::keyingsets, NULL, and scene.
Referenced by ANIM_OT_keying_set_path_add(), and ANIM_OT_keying_set_remove().
|
static |
Definition at line 88 of file keyingsets.c.
References Scene::active_keyingset, KeyingSet::active_path, BLI_findlink(), C, CTX_data_scene(), ListBase::first, Scene::keyingsets, NULL, KeyingSet::paths, and scene.
Referenced by ANIM_OT_keying_set_path_remove().
|
static |
Definition at line 68 of file keyingsets.c.
References C, CTX_data_scene(), and NULL.
Referenced by ANIM_OT_keying_set_add().
|
static |
Definition at line 147 of file keyingsets.c.
References Scene::active_keyingset, BKE_keyingset_free(), BKE_report(), BLI_findlink(), BLI_freelinkN(), C, CTX_data_scene(), Scene::keyingsets, NC_SCENE, ND_KEYINGSET, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, scene, and WM_event_add_notifier().
Referenced by ANIM_OT_keying_set_remove().
|
static |
Definition at line 238 of file keyingsets.c.
References Scene::active_keyingset, KeyingSet::active_path, BKE_keyingset_free_path(), BKE_report(), BLI_findlink(), C, CTX_data_scene(), Scene::keyingsets, OPERATOR_CANCELLED, OPERATOR_FINISHED, KeyingSet::paths, wmOperator::reports, RPT_ERROR, and scene.
Referenced by ANIM_OT_keying_set_path_remove().
|
static |
Definition at line 391 of file keyingsets.c.
References Scene::active_keyingset, BKE_keyingset_find_path(), BKE_keyingset_free_path(), BKE_report(), BLI_findlink(), C, CTX_data_scene(), PointerRNA::data, Scene::keyingsets, KSP_GROUP_KSNAME, MEM_freeN, KeyingSet::name, NC_SCENE, ND_KEYINGSET, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, PointerRNA::owner_id, ptr, wmOperator::reports, RNA_path_from_ID_to_property(), RPT_ERROR, RPT_INFO, scene, UI_context_active_but_prop_get(), and WM_event_add_notifier().
Referenced by ANIM_OT_keyingset_button_remove().
|
static |
Definition at line 884 of file keyingsets.c.
References C, ListBase::first, KeyingSetInfo::generate, tRKS_DSource::next, and tRKS_DSource::ptr.
Referenced by ANIM_validate_keyingset().
Definition at line 533 of file keyingsets.c.
Referenced by ANIM_builtin_keyingset_get_named(), ANIM_keying_sets_enum_itemf(), ANIM_keyingset_get_from_enum_type(), ANIM_keyingset_get_from_idname(), ANIM_keyingset_info_register(), ANIM_keyingset_info_unregister(), ANIM_keyingset_infos_exit(), ANIM_scene_get_active_keyingset(), and ANIM_scene_get_keyingset_index().
Definition at line 530 of file keyingsets.c.
Referenced by ANIM_keyingset_info_find_name(), ANIM_keyingset_info_register(), ANIM_keyingset_info_unregister(), and ANIM_keyingset_infos_exit().