|
Blender V5.3
|
Namespaces | |
| namespace | internal |
| namespace | legacy |
| namespace | nla |
| namespace | tests |
| namespace | versioning |
Classes | |
| class | Action |
| class | AnimatedProperty |
| class | BoneColor |
| class | Channelbag |
| class | ChannelGroup |
| class | CombinedKeyingResult |
| class | EvaluationResult |
| struct | FCurveDescriptor |
| struct | KeyframeSettings |
| struct | KeyInsertData |
| class | Layer |
| class | PropIdentifier |
| class | Slot |
| class | SlotRuntime |
| class | Strip |
| class | StripKeyframeData |
| struct | TempFrameValCache |
Typedefs | |
| using | slot_handle_t = decltype(blender::ActionSlot::handle) |
Enumerations | |
| enum class | ActionSlotAssignmentResult : int8_t { OK = 0 , SlotNotFromAction = 1 , SlotNotSuitable = 2 , MissingAction = 3 } |
| enum class | BakeCurveRemove { NONE = 0 , IN_RANGE = 1 , OUT_RANGE = 2 , ALL = 3 } |
| enum class | SingleKeyingResult { SUCCESS = 0 , UNKNOWN_FAILURE , CANNOT_CREATE_FCURVE , FCURVE_NOT_KEYFRAMEABLE , NO_KEY_NEEDED , UNABLE_TO_INSERT_TO_NLA_STACK , ID_NOT_EDITABLE , ID_NOT_ANIMATABLE , NO_VALID_LAYER , NO_VALID_STRIP , NO_VALID_SLOT , CANNOT_RESOLVE_PATH , _KEYING_RESULT_MAX } |
| enum class | ModifyKeyMode { INSERT = 0 , DELETE_KEY } |
| enum class | ModifyKeyReturn { SUCCESS = 0 , INVALID_CONTEXT = -1 , MISSING_TYPEINFO = -2 } |
| enum | { VISUALKEY_NONE = 0 , VISUALKEY_LOC , VISUALKEY_ROT , VISUALKEY_SCA } |
Functions | |
| ENUM_OPERATORS (Layer::Flags) | |
| ENUM_OPERATORS (Slot::Flags) | |
| Action & | action_add (Main &bmain, StringRefNull name) |
| bool | assign_action (bAction *action, ID &animated_id) |
| bool | assign_action (bAction *action, OwnedAnimData owned_adt) |
| ActionSlotAssignmentResult | assign_action_slot (Slot *slot_to_assign, ID &animated_id) |
| ActionSlotAssignmentResult | assign_action_and_slot (Action *action, Slot *slot_to_assign, ID &animated_id) |
| Slot * | assign_action_ensure_slot_for_keying (Action &action, ID &animated_id) |
| bool | assign_tmpaction (bAction *action, OwnedAnimData owned_adt) |
| ActionSlotAssignmentResult | assign_tmpaction_and_slot_handle (bAction *action, slot_handle_t slot_handle, OwnedAnimData owned_adt) |
| bool | unassign_action (ID &animated_id) |
| bool | unassign_action (OwnedAnimData owned_adt) |
| bool | generic_assign_action (ID &animated_id, bAction *action_to_assign, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier) |
| ActionSlotAssignmentResult | generic_assign_action_slot (Slot *slot_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier) |
| ActionSlotAssignmentResult | generic_assign_action_slot_handle (slot_handle_t slot_handle_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier) |
| Slot * | generic_slot_for_autoassign (const ID &animated_id, Action &action, StringRefNull last_slot_identifier) |
| Action * | get_action (ID &animated_id) |
| std::optional< std::pair< Action *, Slot * > > | get_action_slot_pair (ID &animated_id) |
| const animrig::Channelbag * | channelbag_for_action_slot (const Action &action, slot_handle_t slot_handle) |
| animrig::Channelbag * | channelbag_for_action_slot (Action &action, slot_handle_t slot_handle) |
| Vector< animrig::Channelbag * > | channelbags_for_action_slot (Action &action, slot_handle_t slot_handle) |
| Span< FCurve * > | fcurves_for_action_slot (Action &action, slot_handle_t slot_handle) |
| Span< const FCurve * > | fcurves_for_action_slot (const Action &action, slot_handle_t slot_handle) |
| Channelbag & | action_channelbag_ensure (bAction &dna_action, ID &animated_id) |
| FCurve & | action_fcurve_ensure (Main *bmain, bAction &action, ID &animated_id, const FCurveDescriptor &fcurve_descriptor) |
| FCurve * | action_fcurve_ensure_ex (Main *bmain, bAction *act, PointerRNA *ptr, const FCurveDescriptor &fcurve_descriptor) |
| FCurve * | fcurve_find_in_action (bAction *act, const FCurveDescriptor &fcurve_descriptor) |
| FCurve * | fcurve_find_in_action_slot (bAction *act, slot_handle_t slot_handle, const FCurveDescriptor &fcurve_descriptor) |
| FCurve * | fcurve_find_in_assigned_slot (AnimData &adt, const FCurveDescriptor &fcurve_descriptor) |
| bool | fcurve_matches_collection_path (const FCurve &fcurve, StringRefNull collection_rna_path, StringRefNull data_name) |
| Vector< FCurve * > | fcurves_in_action_slot_filtered (bAction *act, slot_handle_t slot_handle, FunctionRef< bool(const FCurve &fcurve)> predicate) |
| Vector< FCurve * > | fcurves_in_span_filtered (Span< FCurve * > fcurves, FunctionRef< bool(const FCurve &fcurve)> predicate) |
| Vector< FCurve * > | fcurves_in_listbase_filtered (ListBaseT< FCurve > fcurves, FunctionRef< bool(const FCurve &fcurve)> predicate) |
| bool | action_fcurve_remove (Action &action, FCurve &fcu) |
| bool | action_fcurve_detach (Action &action, FCurve &fcurve_to_detach) |
| void | action_fcurve_attach (Action &action, slot_handle_t action_slot, FCurve &fcurve_to_attach, std::optional< StringRefNull > group_name) |
| void | action_fcurve_move (Action &action_dst, slot_handle_t action_slot_dst, Action &action_src, FCurve &fcurve) |
| void | channelbag_fcurves_move (Channelbag &channelbag_dst, Channelbag &channelbag_src) |
| ID * | action_slot_get_id_for_keying (Main &bmain, Action &action, slot_handle_t slot_handle, ID *primary_id) |
| ID * | action_slot_get_id_best_guess (Main &bmain, Slot &slot, ID *primary_id) |
| slot_handle_t | first_slot_handle (const bAction &dna_action) |
| void | assert_baklava_phase_1_invariants (const Action &action) |
| void | assert_baklava_phase_1_invariants (const Layer &layer) |
| void | assert_baklava_phase_1_invariants (const Strip &strip) |
| void | move_slot (Main &bmain, Slot &slot, Action &from_action, Action &to_action) |
| Slot & | duplicate_slot (Action &action, const Slot &slot) |
| void | deselect_keys_actions (Span< bAction * > actions) |
| void | action_deselect_keys (Action &action) |
| void | foreach_fcurve_in_action (Action &action, FunctionRef< void(FCurve &fcurve)> callback) |
| void | foreach_fcurve_in_action_slot (Action &action, slot_handle_t handle, FunctionRef< void(FCurve &fcurve)> callback) |
| void | foreach_fcurve_in_action_slot_editable (Action &action, slot_handle_t handle, FunctionRef< void(FCurve &fcurve)> callback) |
| bool | foreach_action_slot_use (const ID &animated_id, FunctionRef< bool(Action &action, slot_handle_t slot_handle)> callback) |
| bool | foreach_action_slot_use_with_references (ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *last_slot_identifier)> callback) |
| bool | foreach_action_slot_use_with_rna (ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *action, PointerRNA &action_slot_owner_ptr, PropertyRNA &action_slot_prop, char *last_slot_identifier)> callback) |
| const FCurve * | fcurve_find_by_rna_path (const AnimData &adt, StringRefNull rna_path, int array_index) |
| Span< FCurve * > | fcurves_for_assigned_action (AnimData *adt) |
| Span< const FCurve * > | fcurves_for_assigned_action (const AnimData *adt) |
| bool | bone_is_visible (const bArmature *armature, const Bone *bone) |
| bool | bone_is_visible (const bArmature *armature, const bke::PChanBoneConst pchanbone) |
| bool | bone_is_visible (const bArmature *armature, const EditBone *ebone) |
| bool | bone_is_selected (const bArmature *armature, const Bone *bone) |
| bool | bone_is_selected (const bArmature *armature, const bke::PChanBoneConst pchanbone) |
| bool | bone_is_selected (const bArmature *armature, const EditBone *ebone) |
| bool | bone_is_selectable (const bArmature *armature, const bke::PChanBoneConst pchanbone) |
| bool | bone_is_selectable (const bArmature *armature, const bPoseChannel *pchan) |
| bool | bone_is_selectable (const bArmature *armature, const Bone *bone) |
| void | bone_select (bPoseChannel *pchan) |
| void | bone_deselect (bPoseChannel *pchan) |
| void | pose_bone_descendent_iterator (Object &pose_ob, bPoseChannel &pchan, FunctionRef< void(bPoseChannel &child_bone)> callback) |
| bool | pose_bone_descendent_depth_iterator (Object &pose_ob, bPoseChannel &pchan, FunctionRef< bool(bPoseChannel &child_bone)> callback) |
| template<typename CB> | |
| static void | ANIM_armature_foreach_bone (ListBaseT< Bone > *bones, CB callback) |
| template<typename CB> | |
| static void | ANIM_armature_foreach_bone (const ListBaseT< Bone > *bones, CB callback) |
| int | armature_bonecoll_find_index (const bArmature *armature, const BoneCollection *bcoll) |
| int | armature_bonecoll_find_parent_index (const bArmature *armature, int bcoll_index) |
| int | armature_bonecoll_child_number_find (const bArmature *armature, const BoneCollection *bcoll) |
| int | armature_bonecoll_child_number_set (bArmature *armature, BoneCollection *bcoll, int new_child_number) |
| bool | armature_bonecoll_is_root (const bArmature *armature, int bcoll_index) |
| bool | armature_bonecoll_is_child_of (const bArmature *armature, int potential_parent_index, int potential_child_index) |
| bool | armature_bonecoll_is_descendant_of (const bArmature *armature, int potential_parent_index, int potential_descendant_index) |
| bool | bonecoll_has_children (const BoneCollection *bcoll) |
| void | bonecolls_copy_expanded_flag (Span< BoneCollection * > bcolls_dest, Span< const BoneCollection * > bcolls_source) |
| int | armature_bonecoll_move_to_parent (bArmature *armature, int from_bcoll_index, int to_child_num, int from_parent_index, int to_parent_index) |
| Map< BoneCollection *, BoneCollection * > | ANIM_bonecoll_array_copy_no_membership (BoneCollection ***bcoll_array_dst, int *bcoll_array_dst_num, BoneCollection **bcoll_array_src, int bcoll_array_src_num, bool do_id_user) |
| void | ANIM_bonecoll_array_free (BoneCollection ***bcoll_array, int *bcoll_array_num, bool do_id_user) |
| const BoneColor & | ANIM_bonecolor_posebone_get (bke::PChanBoneConst pchanbone) |
| float | evaluate_driver_from_rna_pointer (const AnimationEvalContext *anim_eval_context, PointerRNA *ptr, PropertyRNA *prop, const FCurve *fcu) |
| EvaluationResult | evaluate_action (PointerRNA &animated_id_ptr, Action &action, slot_handle_t slot_handle, const AnimationEvalContext &anim_eval_context) |
| void | evaluate_and_apply_action (PointerRNA &animated_id_ptr, Action &action, slot_handle_t slot_handle, const AnimationEvalContext &anim_eval_context, bool flush_to_original) |
| KeyframeSettings | get_keyframe_settings (bool from_userprefs) |
| const FCurve * | fcurve_find (Span< const FCurve * > fcurves, const FCurveDescriptor &fcurve_descriptor) |
| FCurve * | fcurve_find (Span< FCurve * > fcurves, const FCurveDescriptor &fcurve_descriptor) |
| FCurve * | create_fcurve_for_channel (const FCurveDescriptor &fcurve_descriptor) |
| eFCurve_Flags | fcurve_flags_for_property_type (PropertyType prop_type) |
| void | initialize_bezt (BezTriple *beztr, float2 position, const KeyframeSettings &settings, eFCurve_Flags fcu_flags) |
| bool | fcurve_delete_keyframe_at_time (FCurve *fcurve, float time) |
| bool | delete_keyframe_fcurve_legacy (AnimData *adt, FCurve *fcu, float cfra) |
| int | insert_bezt_fcurve (FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag) |
| Lesser Key-framing API call. | |
| SingleKeyingResult | insert_vert_fcurve (FCurve *fcu, const float2 position, const KeyframeSettings &settings, eInsertKeyFlags flag) |
| Main Key-framing API call. | |
| void | sample_fcurve_segment (const FCurve *fcu, float start_frame, float sample_rate, float *samples, int sample_count) |
| void | bake_fcurve (FCurve *fcu, int2 range, float step, BakeCurveRemove remove_existing) |
| void | bake_fcurve_segments (FCurve *fcu) |
| bool | fcurve_frame_has_keyframe (const FCurve *fcu, float frame) |
| void | generate_single_keying_result_report (const SingleKeyingResult result, ReportList *reports) |
| std::optional< StringRefNull > | default_channel_group_for_path (const PointerRNA *animated_struct, StringRef prop_rna_path) |
| bool | key_insertion_may_create_fcurve (eInsertKeyFlags insert_key_flags) |
| void | pose_apply_action_all_bones (Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context) |
| void | pose_apply_action_blend (Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context, float blend_factor) |
| void | pose_apply_action_blend_all_bones (Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context, float blend_factor) |
| void | pose_apply_action (Span< Object * > objects, Action &pose_action, const AnimationEvalContext *anim_eval_context, float blend_factor) |
| bool | any_bone_selected (Span< const Object * > objects) |
| Slot & | get_best_pose_slot_for_id (const ID &id, Action &pose_data) |
| Vector< float > | get_rna_values (PointerRNA *ptr, PropertyRNA *prop) |
| StringRefNull | get_rotation_mode_path (eRotationModes rotation_mode) |
| std::string | get_pose_bone_rna_path (const bPoseChannel &pose_bone) |
| std::optional< std::string > | pose_bone_name_from_rna_path (ParsedRNAPathRef rna_path) |
| std::optional< eRotationModes > | get_rotation_mode_from_path (ParsedRNAPathRef rna_path) |
| std::optional< eRotationModes > | get_rotation_mode_from_rna_pointer (const PointerRNA &ptr) |
| bool | is_rotation_path (ParsedRNAPathRef rna_path) |
| Vector< RNAPath > | get_keyable_id_property_paths (const PointerRNA &ptr) |
| Array< float > | rna_property_get_as_float (PointerRNA &ptr, PropertyRNA &prop) |
| void | rna_property_set_as_float (PointerRNA &ptr, PropertyRNA &prop, Span< float > values) |
| bool | visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) |
| Vector< float > | visualkey_get_values (PointerRNA *ptr, PropertyRNA *prop) |
| static animrig::Layer & | ActionLayer_alloc () |
| template<typename T> | |
| static void | grow_array (T **array, int *num, const int add_num) |
| template<typename T> | |
| static void | grow_array_and_append (T **array, int *num, T item) |
| template<typename T> | |
| static void | grow_array_and_insert (T **array, int *num, const int index, T item) |
| template<typename T> | |
| static void | shrink_array (T **array, int *num, const int shrink_num) |
| template<typename T> | |
| static void | shrink_array_and_remove (T **array, int *num, const int index) |
| template<typename T> | |
| static void | shrink_array_and_swap_remove (T **array, int *num, const int index) |
| template<typename T> | |
| static void | array_shift_range (T *array, const int num, const int range_start, const int range_end, const int to) |
| static void | layer_ptr_destructor (ActionLayer **dna_layer_ptr) |
| static void | slot_identifier_ensure_unique (Action &action, Slot &slot) |
| static void | slot_ptr_destructor (ActionSlot **dna_slot_ptr) |
| static float2 | get_frame_range_of_fcurves (Span< const FCurve * > fcurves, bool include_modifiers) |
| static void | strip_ptr_destructor (ActionStrip **dna_strip_ptr) |
| static bool | is_id_using_action_slot (const ID &animated_id, const Action &action, const slot_handle_t slot_handle) |
| static void | channelbag_ptr_destructor (ActionChannelbag **dna_channelbag_ptr) |
| static void | fcurve_ptr_destructor (FCurve **fcurve_ptr) |
| static void | fcurve_ptr_noop_destructor (FCurve **) |
| static void | cyclic_keying_ensure_modifier (FCurve &fcurve) |
| static void | cyclic_keying_ensure_cycle_range_exists (FCurve &fcurve, const float2 cycle_range) |
| static void | clone_slot (const Slot &from, Slot &to) |
| bool | foreach_action_slot_use_with_rna (ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *action, PointerRNA &action_slot_ptr, PropertyRNA &action_slot_prop, char *last_slot_identifier)> callback) |
| static bool | is_idproperty_keyable (const IDProperty *id_prop, PointerRNA *ptr, PropertyRNA *prop) |
| static bool | pose_depth_iterator_recursive (Object &pose_ob, bke::PChanBone pchanbone, FunctionRef< bool(bPoseChannel &child_bone)> callback) |
| void | blend_layer_results (EvaluationResult &final_result, const EvaluationResult &intermediate_result, const Layer ¤t_layer) |
| void | apply_evaluation_result (const EvaluationResult &evaluation_result, PointerRNA &animated_id_ptr, bool flush_to_original) |
| static bool | is_fcurve_evaluatable (const FCurve *fcu) |
| static void | animsys_construct_orig_pointer_rna (const PointerRNA *ptr, PointerRNA *ptr_orig) |
| static void | animsys_write_orig_anim_rna (PointerRNA *ptr, const ParsedRNAPathRef rna_path, const int array_index, const float value) |
| static EvaluationResult | evaluate_keyframe_data (PointerRNA &animated_id_ptr, StripKeyframeData &strip_data, const slot_handle_t slot_handle, const AnimationEvalContext &offset_eval_context) |
| static EvaluationResult | evaluate_strip (PointerRNA &animated_id_ptr, Action &owning_action, Strip &strip, const slot_handle_t slot_handle, const AnimationEvalContext &anim_eval_context) |
| static void | replace_bezt_keyframe_ypos (BezTriple *dst, const BezTriple *bezt) |
| static void | subdivide_nonauto_handles (const FCurve *fcu, BezTriple *bezt, BezTriple *prev, BezTriple *next) |
| static bool | new_key_needed (const FCurve &fcu, const float frame, const float value) |
| static float2 | remap_cyclic_keyframe_location (const FCurve &fcu, const eFCU_Cycle_Type type, float2 position) |
| static void | remove_fcurve_key_range (FCurve *fcu, const int2 range, const BakeCurveRemove removal_mode) |
| static bool | assigned_action_has_keyframe_at (AnimData &adt, const float frame) |
| static bool | object_frame_has_keyframe (Object *ob, const float frame) |
| static float | nla_time_remap (float time, const AnimationEvalContext *anim_eval_context, PointerRNA *id_ptr, AnimData *adt, bAction *act, ListBaseT< NlaKeyframingContext > *nla_cache, NlaKeyframingContext **r_nla_context) |
| static void | deg_tag_after_keyframe_delete (Main *bmain, ID *id, AnimData *adt) |
| static SingleKeyingResult | insert_key_layer (Main *bmain, Action &action, Layer &layer, const Slot &slot, const std::string &rna_path, PropertyRNA *prop, const std::optional< StringRefNull > channel_group, const KeyInsertData &key_data, const KeyframeSettings &key_settings, const eInsertKeyFlags insert_key_flags) |
| static std::pair< Layer *, Slot * > | prep_action_layer_for_keying (Action &action, ID &animated_id) |
| static CombinedKeyingResult | insert_key_layered_action (Main *bmain, Action &action, Layer &layer, const Slot &slot, PropertyRNA *prop, const std::optional< StringRefNull > channel_group, const std::string &rna_path, const float frame, const Span< float > values, const eInsertKeyFlags insert_key_flags, const KeyframeSettings &key_settings, const BitSpan keying_mask) |
| static eInsertKeyFlags | get_autokey_flags (const Scene *scene) |
| static void | RKS_ITER_overrides_list (KeyingSetInfo *keyingset_info, bContext *C, KeyingSet *keyingset, Vector< PointerRNA > &sources) |
| static eInsertKeyFlags | keyingset_apply_keying_flags (const eInsertKeyFlags base_flags, const eInsertKeyFlags overrides, const eInsertKeyFlags own_flags) |
| static int | insert_key_to_keying_set_path (bContext *C, KS_Path *keyingset_path, KeyingSet *keyingset, const eInsertKeyFlags insert_key_flags, const ModifyKeyMode mode, const float frame) |
| static bool | is_fcurve_evaluatable (const FCurve &fcu) |
| static float | get_fcurve_blend_value (FCurve &fcu, PathResolvedRNA &anim_rna, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
| static bool | rotation_mode_is_euler (const eRotationModes rotation_mode) |
| static void | animsys_quaternion_evaluate_fcurves (PointerRNA &ptr, PropertyRNA *prop, const Span< FCurve * > quat_fcurves, const AnimationEvalContext *anim_eval_context, float r_quaternion[4]) |
| static void | animsys_blend_fcurves_quaternion (PointerRNA &ptr, PropertyRNA *prop, const Span< FCurve * > quaternion_fcurves, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
| static void | blend_rotation (PointerRNA &ptr, PropertyRNA *prop, const Span< FCurve * > rotation_fcurves, const eRotationModes fcurve_rotation_mode, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
| static void | blend_rotation_with_conversion (PointerRNA &ptr, const Span< FCurve * > rotation_fcurves, const eRotationModes fcurve_rotation_mode, const float eval_time, const float blend_factor) |
| static void | animsys_blend_in_fcurves (PointerRNA &ptr, const Span< FCurve * > fcurves, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
| static void | blend_in_action (PointerRNA &ptr, Action &act, const int32_t action_slot_handle, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
| void | pose_apply_action_all_bones (Object *ob, bAction *action, const int32_t slot_handle, const AnimationEvalContext *anim_eval_context) |
| void | pose_apply_action_blend (Object *ob, bAction *action, const int32_t slot_handle, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
| bool | any_bone_selected (const Span< const Object * > objects) |
| void | pose_apply_action (const Span< Object * > objects, Action &pose_action, const AnimationEvalContext *anim_eval_context, const float blend_factor) |
Public F-Curves API | |
| bAction * | id_action_ensure (Main *bmain, ID *id) |
| void | animdata_fcurve_delete (AnimData *adt, FCurve *fcu) |
| bool | animdata_remove_empty_action (AnimData *adt) |
| Vector< ID * > | find_related_ids (Main &bmain, ID &id) |
| static void | add_object_data_users (const Main &bmain, const ID &id, Vector< ID * > &related_ids) |
| static bAction * | find_related_action (Main &bmain, ID &id) |
Key-Framing Management | |
| void | update_autoflags_fcurve_direct (FCurve *fcu, PropertyType prop_type) |
| Vector< float > | get_property_values (PointerRNA *ptr, PropertyRNA *prop, bool visual_key) |
| CombinedKeyingResult | insert_keyframes (Main *bmain, PointerRNA *struct_pointer, std::optional< StringRefNull > channel_group, const Span< RNAPath > rna_paths, std::optional< float > scene_frame, const AnimationEvalContext &anim_eval_context, eBezTriple_KeyframeType key_type, eInsertKeyFlags insert_key_flags) |
| Main key-frame insertion API. | |
| SingleKeyingResult | insert_keyframe_direct (PointerRNA &ptr, PropertyRNA &prop, FCurve &fcu, float fcurve_frame, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag) |
| Secondary Insert Key-framing API call. | |
| int | delete_keyframe (Main *bmain, ReportList *reports, ID *id, const RNAPath &rna_path, float cfra) |
| Main Delete Key-Framing API call. | |
| int | clear_keyframe (Main *bmain, ReportList *reports, ID *id, const RNAPath &rna_path) |
| bool | is_keying_flag (const Scene *scene, eKeying_Flag flag) |
| bool | id_frame_has_keyframe (ID *id, float frame) |
| eInsertKeyFlags | get_keyframing_flags (Scene *scene) |
Auto keyframing | |
Notes:
| |
| bool | is_autokey_on (const Scene *scene) |
| bool | is_autokey_mode (const Scene *scene, eAutokey_Mode mode) |
| bool | autokeyframe_cfra_can_key (const Scene *scene, ID *id) |
| void | autokeyframe_object (bContext *C, const Scene *scene, Object *ob, Span< RNAPath > rna_paths) |
| bool | autokeyframe_object (bContext *C, Scene *scene, Object *ob, KeyingSet *ks) |
| bool | autokeyframe_pchan (bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks) |
| void | autokeyframe_pose_channel (bContext *C, Scene *scene, Object *ob, bPoseChannel *pose_channel, Span< RNAPath > rna_paths, short targetless_ik) |
| bool | autokeyframe_property (bContext *C, Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, float cfra, bool only_if_property_keyed) |
Keyingset Usage | |
| ModifyKeyReturn | validate_keyingset (bContext *C, Vector< PointerRNA > *sources, KeyingSet *keyingset) |
| int | apply_keyingset (bContext *C, Vector< PointerRNA > *sources, KeyingSet *keyingset, ModifyKeyMode mode, float cfra) |
Queries | |
| KeyingSet * | builtin_keyingset_get_named (const char name[]) |
| KeyingSetInfo * | keyingset_info_find_name (const char name[]) |
| bool | keyingset_find_id (KeyingSet *keyingset, ID *id) |
| KeyingSet * | get_keyingset_for_autokeying (const Scene *scene, const char *transformKSName) |
| KeyingSet * | scene_get_active_keyingset (const Scene *scene) |
Creation, Destruction | |
| void | keyingset_info_register (KeyingSetInfo *keyingset_info) |
| void | keyingset_info_unregister (Main *bmain, KeyingSetInfo *keyingset_info) |
| void | keyingset_infos_exit () |
| void | relative_keyingset_add_source (Vector< PointerRNA > &sources, ID *id, StructRNA *srna, void *data) |
| void | relative_keyingset_add_source (Vector< PointerRNA > &sources, ID *id) |
Variables | |
| constexpr char | bone_default_name [] = "Bone" |
| constexpr const char * | pose_bone_path_prefix = "pose.bones[\"" |
| typedef int32_t blender::animrig::slot_handle_t = decltype(blender::ActionSlot::handle) |
Action slot handle type.
An identifier of slots within an action that is guaranteed to be unique within that action and is guaranteed not to change for a slot.
NOTE: keep this type in sync with ActionSlot::handle in the action DNA types. We redefine it here rather than making a type alias to avoid bringing in the entirety of DNA_action_types.h for everything that includes this header.
Definition at line 30 of file ANIM_action_iterators.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| VISUALKEY_NONE | |
| VISUALKEY_LOC | |
| VISUALKEY_ROT | |
| VISUALKEY_SCA | |
Definition at line 30 of file visualkey.cc.
|
strong |
| Enumerator | |
|---|---|
| OK | |
| SlotNotFromAction | |
| SlotNotSuitable | |
| MissingAction | |
Definition at line 1403 of file ANIM_action.hh.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| IN_RANGE | |
| OUT_RANGE | |
| ALL | |
Definition at line 150 of file ANIM_fcurve.hh.
|
strong |
Mode for modify_keyframes.
| Enumerator | |
|---|---|
| INSERT | |
| DELETE_KEY | |
Definition at line 85 of file ANIM_keyingsets.hh.
|
strong |
Return codes for errors (with Relative KeyingSets).
| Enumerator | |
|---|---|
| SUCCESS | |
| INVALID_CONTEXT | |
| MISSING_TYPEINFO | There isn't any type-info for generating paths from context. |
Definition at line 92 of file ANIM_keyingsets.hh.
|
strong |
Represents a single success/failure in the keyframing process.
What is considered "single" depends on the level at which the failure happens. For example, it can be at the level of a single key on a single fcurve, all the way up to the level of an entire ID not being animatable. Both are considered "single" events.
Definition at line 44 of file ANIM_keyframing.hh.
| Action & blender::animrig::action_add | ( | Main & | bmain, |
| StringRefNull | name ) |
Create a new Action with zero users.
This is basically the same as BKE_action_add, except that the Action has zero users and it's already wrapped with its C++ wrapper.
Definition at line 1158 of file animrig/intern/action.cc.
References action_add(), blender::BKE_action_add(), blender::BLI_assert(), blender::StringRefNull::c_str(), blender::bAction::id, blender::id_us_min(), and blender::ID::us.
Referenced by action_add(), blender::ensure_animdata_pair(), blender::ed::animrig::extract_pose(), blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize(), blender::io::fbx::import_animations(), blender::replace_action_new_exec(), blender::separate_slots_exec(), blender::slot_channels_move_to_new_action_exec(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| Channelbag & blender::animrig::action_channelbag_ensure | ( | bAction & | dna_action, |
| ID & | animated_id ) |
Find or create a Channelbag on the given action, for the given ID.
This function also ensures that there is a layer and a keyframe strip for the channelbag to exist on.
| dna_action | MUST already be assigned to the animated ID. |
| animated_id | The ID that is animated by this Action. It is used to create and assign an appropriate slot if needed when creating the fcurve, and set the fcurve color properly |
Definition at line 2718 of file animrig/intern/action.cc.
References action_channelbag_ensure(), assert_baklava_phase_1_invariants(), assign_action_ensure_slot_for_keying(), blender::BLI_assert(), blender::animrig::StripKeyframeData::channelbag_for_slot_ensure(), blender::animrig::Strip::data(), get_action(), blender::animrig::Action::layer(), blender::animrig::Action::layer_keystrip_ensure(), and blender::animrig::Layer::strip().
Referenced by action_channelbag_ensure(), action_fcurve_ensure(), blender::io::fbx::create_material_curves(), blender::io::alembic::FCurveCreationHelper::ensure_action_data(), blender::io::usd::import_blendshapes(), blender::io::usd::USDCameraReader::read_object_data(), blender::editor::animation::tests::TEST_F(), and blender::editor::animation::tests::TEST_F().
| void blender::animrig::action_deselect_keys | ( | Action & | action | ) |
Deselect all keys within the action.
Definition at line 21 of file action_selection.cc.
References action_deselect_keys(), blender::BKE_fcurve_deselect_all_keys(), and blender::animrig::legacy::fcurves_all().
Referenced by action_deselect_keys(), blender::ANIM_deselect_keys_in_animation_editors(), and deselect_keys_actions().
| void blender::animrig::action_fcurve_attach | ( | Action & | action, |
| slot_handle_t | action_slot, | ||
| FCurve & | fcurve_to_attach, | ||
| std::optional< StringRefNull > | group_name ) |
Attach the F-Curve to the Action Slot.
This assumes the 'Baklava Phase 1' invariants (one layer, one keyframe strip).
Definition at line 2775 of file animrig/intern/action.cc.
References action_fcurve_attach(), blender::FCurve::array_index, blender::BLI_assert(), blender::animrig::StripKeyframeData::channelbag_for_slot_ensure(), blender::animrig::Strip::data(), blender::animrig::Channelbag::fcurve_append(), blender::bAction::id, blender::animrig::Action::layer(), blender::animrig::Action::layer_keystrip_ensure(), blender::ID::name, blender::gpu::shader::metadata::printf, blender::animrig::Action::slot_for_handle(), and blender::animrig::Layer::strip().
Referenced by blender::action_copy_fcurves_by_basepath(), action_fcurve_attach(), action_fcurve_move(), blender::ed::vse::sequencer_paste_animation(), blender::ed::vse::sequencer_write_copy_paste_file(), and blender::seq::strip_animation_duplicate().
Detach the F-Curve from the Action, searching for it in all channelbags.
The F-Curve is not freed, and ownership is transferred to the caller.
Definition at line 2756 of file animrig/intern/action.cc.
References action_fcurve_detach(), blender::animrig::StripKeyframeData::channelbags(), blender::animrig::Strip::Keyframe, layer, and blender::animrig::Action::layers().
Referenced by action_fcurve_detach(), action_fcurve_move(), and action_fcurve_remove().
| FCurve & blender::animrig::action_fcurve_ensure | ( | Main * | bmain, |
| bAction & | action, | ||
| ID & | animated_id, | ||
| const FCurveDescriptor & | fcurve_descriptor ) |
Find or create an F-Curve on the given action that matches the given fcurve descriptor.
| bmain | If not nullptr, this function also ensures that dependency graph relationships are rebuilt. This is necessary when adding a new F-Curve, as a previously-unanimated depsgraph component may become animated now. |
| action | MUST already be assigned to the animated ID. |
| animated_id | The ID that is animated by this Action. It is used to create and assign an appropriate slot if needed when creating the fcurve, and set the fcurve color properly |
| fcurve_descriptor | description of the fcurve to lookup/create. Note that this is not relative to ptr (e.g. if ptr is not an ID). It should contain the exact data path of the fcurve to be looked up/created. |
Definition at line 2737 of file animrig/intern/action.cc.
References action_channelbag_ensure(), action_fcurve_ensure(), and blender::animrig::Channelbag::fcurve_ensure().
Referenced by action_fcurve_ensure(), action_fcurve_ensure_ex(), blender::io::otio::insert_keyframes(), and blender::bke::tests::TEST_F().
| FCurve * blender::animrig::action_fcurve_ensure_ex | ( | Main * | bmain, |
| bAction * | act, | ||
| PointerRNA * | ptr, | ||
| const FCurveDescriptor & | fcurve_descriptor ) |
Find or create an F-Curve on the given action that matches the given fcurve descriptor.
This function was primarily intended for use with legacy actions, but for reasons of expedience it also works with layered actions under the following limited circumstances: ptr must be non-null and must have an owner_id that already uses act. See the comments in the implementation for more details.
| ptr | RNA pointer for the struct the fcurve is being looked up/created for. It is used to create and assign an appropriate slot if needed when creating the fcurve, and set the fcurve color properly |
| fcurve_descriptor | description of the fcurve to lookup/create. Note that this is not relative to ptr (e.g. if ptr is not an ID). It should contain the exact data path of the fcurve to be looked up/created. |
Definition at line 2685 of file animrig/intern/action.cc.
References action_fcurve_ensure(), action_fcurve_ensure_ex(), blender::BLI_assert(), and blender::PointerRNA::owner_id.
Referenced by action_fcurve_ensure_ex(), blender::ed::object::followpath_path_animate_exec(), blender::ed::object::parent_set_with_depsgraph(), blender::ui::tests::CopyDriversToSelected::SetUp(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| void blender::animrig::action_fcurve_move | ( | Action & | action_dst, |
| slot_handle_t | action_slot_dst, | ||
| Action & | action_src, | ||
| FCurve & | fcurve ) |
Move an F-Curve from one Action to the other.
If the F-Curve was part of a channel group, the group membership also carries over to the destination Action. If no group with the same name exists, it is created. This only happens for layered Actions, though.
The F-Curve must exist on the source Action. All channelbags for all slots are searched for the F-Curve.
| action_slot_dst | may not be #Slot::unassigned on layered Actions. |
Definition at line 2802 of file animrig/intern/action.cc.
References action_fcurve_attach(), action_fcurve_detach(), action_fcurve_move(), blender::BLI_assert(), blender::FCurve::grp, blender::bActionGroup::name, and UNUSED_VARS_NDEBUG.
Referenced by action_fcurve_move(), blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize(), and blender::animrig::tests::TEST_F().
Remove the given FCurve from the action by searching for it in all channelbags. This assumes that an FCurve can only exist in an action once.
Definition at line 2746 of file animrig/intern/action.cc.
References action_fcurve_detach(), action_fcurve_remove(), and blender::BKE_fcurve_free().
Referenced by action_fcurve_remove(), animdata_fcurve_delete(), blender::clear_anim_v3d_exec(), clear_keyframe(), blender::delete_key_v3d_without_keying_set(), blender::ED_anim_ale_fcurve_delete(), blender::ED_curve_updateAnimPaths(), and blender::seq::free_animdata().
Make a best-effort guess as to which ID* is animated by the given slot.
This is only used in rare cases; usually the ID* for which operations are performed is known.
Definition at line 2940 of file animrig/intern/action.cc.
References action_slot_get_id_best_guess(), blender::Span< T >::contains(), blender::Span< T >::is_empty(), and blender::animrig::Slot::users().
Referenced by action_slot_get_id_best_guess(), and blender::ANIM_animfilter_action_slot().
| ID * blender::animrig::action_slot_get_id_for_keying | ( | Main & | bmain, |
| Action & | action, | ||
| slot_handle_t | slot_handle, | ||
| ID * | primary_id ) |
Find an appropriate user of the given Action + Slot for keyframing purposes.
Usually this function shouldn't be necessary, because you'll already have an obvious ID that you're keying. But in some cases (such as the action editor where multiple slots are accessible) the active ID that would normally get keyed might have nothing to do with the slot that's actually getting keyed.
This function handles such cases by attempting to find an actual user of the slot that's appropriate for keying. More specifically:
In other words, the cases where a user of the slot is not returned are:
| primary_id | whenever this is among the users of the action + slot, it is given priority and is returned. May be null. |
Definition at line 2913 of file animrig/intern/action.cc.
References action_slot_get_id_for_keying(), blender::Span< T >::contains(), blender::Span< T >::size(), blender::animrig::Action::slot_for_handle(), and blender::animrig::Slot::users().
Referenced by action_slot_get_id_for_keying(), blender::insert_fcurve_key(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
static |
Definition at line 80 of file animrig/intern/action.cc.
References ActionLayer_alloc(), and layer.
Referenced by ActionLayer_alloc(), and blender::animrig::Action::layer_add().
|
static |
Definition at line 43 of file animdata.cc.
References add_object_data_users(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), blender::Object::data, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, blender::Object::id, ID_REAL_USERS, and blender::Main::objects.
Referenced by add_object_data_users(), and find_related_ids().
|
static |
Call callback(bone) for each bone in the list of bones.
Bones are visited in depth-first order.
TODO: extend the callback with a bool return value to indicate whether the loop should continue or stop.
Definition at line 43 of file ANIM_armature_iter.hh.
References ANIM_armature_foreach_bone(), and CB.
|
static |
Call callback(bone) for each bone in the list of bones.
Bones are visited in depth-first order.
TODO: extend the callback with a bool return value to indicate whether the loop should continue or stop.
Definition at line 26 of file ANIM_armature_iter.hh.
References ANIM_armature_foreach_bone(), and CB.
Referenced by blender::ANIM_armature_bonecoll_reconstruct(), ANIM_armature_foreach_bone(), ANIM_armature_foreach_bone(), and blender::ANIM_armature_runtime_free().
| Map< BoneCollection *, BoneCollection * > blender::animrig::ANIM_bonecoll_array_copy_no_membership | ( | BoneCollection *** | bcoll_array_dst, |
| int * | bcoll_array_dst_num, | ||
| BoneCollection ** | bcoll_array_src, | ||
| int | bcoll_array_src_num, | ||
| bool | do_id_user ) |
Duplicates a list of BoneCollections for edit-mode undo purposes, and returns original-to-duplicate remapping data.
IMPORTANT: this discards membership data in the duplicate collections. This is because this function is only intended to be used with edit-mode Armatures, where the membership information in collections is not definitive, instead being stored in the EditBones. The assumption is that the membership information in the collections will be rebuilt from the EditBones when leaving edit mode.
The source and destination each have two parts: a heap-allocated array of BoneCollection *, and an integer that keeps track of that array's length. The destination parameters are pointers to those components, so they can be modified. The destination array should be empty and unallocated.
| bcoll_array_dst,bcoll_array_dst_num | the destination BoneCollection array and array size. |
| bcoll_array_src,bcoll_array_src_num | the source BoneCollection array and array size. |
| do_id_user | when true, increments the user count of IDs that the BoneCollections' custom properties point to, if any. |
Definition at line 1422 of file animrig/intern/bone_collections.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), ANIM_bonecoll_array_copy_no_membership(), blender::BLI_assert(), blender::BoneCollection::bones, blender::IDP_CopyProperty_ex(), blender::LIB_ID_CREATE_NO_USER_REFCOUNT, blender::MEM_new_array_uninitialized(), blender::BoneCollection::prop, and blender::BoneCollection::system_properties.
Referenced by ANIM_bonecoll_array_copy_no_membership(), blender::undoarm_from_editarm(), and blender::undoarm_to_editarm().
| void blender::animrig::ANIM_bonecoll_array_free | ( | BoneCollection *** | bcoll_array, |
| int * | bcoll_array_num, | ||
| bool | do_id_user ) |
Frees a list of BoneCollections.
IMPORTANT: although there is nothing about this function that fundamentally prevents it from being used generally, other data structures like Armature runtime data and EditBones often store direct pointers to BoneCollections, which this function does NOT handle. Prefer using higher-level functions to remove BoneCollections from Armatures.
| bcoll_array | pointer to the heap-allocated array of BoneCollection * to be freed. |
| bcoll_array_num | pointer to the integer that tracks the length of bcoll_array. |
| do_id_user | when true, decrements the user count of IDs that the BoneCollections' custom properties point to, if any. |
Definition at line 1460 of file animrig/intern/bone_collections.cc.
References ANIM_bonecoll_array_free(), blender::BoneCollection::bones, blender::IDP_FreeProperty_ex(), blender::BoneCollection::prop, and blender::BoneCollection::system_properties.
Referenced by ANIM_bonecoll_array_free(), blender::undoarm_free_data(), and blender::undoarm_to_editarm().
| const BoneColor & blender::animrig::ANIM_bonecolor_posebone_get | ( | bke::PChanBoneConst | pchanbone | ) |
Return the effective BoneColor of this pose bone.
This returns the pose bone's own color, unless it's set to "default", then it defaults to the armature bone color.
Definition at line 90 of file bonecolor.cc.
References ANIM_bonecolor_posebone_get(), blender::bke::PChanBoneT< PoseChannelT, BoneT >::bone, blender::Bone::color, blender::bPoseChannel::color, blender::BoneColor::palette_index, and blender::bke::PChanBoneT< PoseChannelT, BoneT >::pchan.
Referenced by blender::action_group_colors_set_from_posebone(), ANIM_bonecolor_posebone_get(), and blender::pose_select_same_color().
Delete the F-Curve from the given AnimData block (if possible), as appropriate according to animation context.
Definition at line 251 of file animdata.cc.
References blender::AnimData::action, action_fcurve_remove(), animdata_fcurve_delete(), blender::BKE_fcurve_free(), BLI_assert_unreachable, blender::BLI_remlink(), blender::FCurve::driver, blender::AnimData::drivers, and ELEM.
Referenced by animdata_fcurve_delete(), blender::clean_fcurve(), blender::delete_graph_keys(), delete_keyframe(), delete_keyframe_fcurve_legacy(), and blender::ED_anim_ale_fcurve_delete().
| bool blender::animrig::animdata_remove_empty_action | ( | AnimData * | adt | ) |
Unlink the action from animdata if it's empty.
If the action has no F-Curves, unlink it from AnimData if it did not come from a NLA Strip being tweaked.
Definition at line 279 of file animdata.cc.
References blender::AnimData::action, blender::ADT_NLA_EDIT_ON, animdata_remove_empty_action(), blender::DEG_id_tag_update(), blender::AnimData::flag, blender::bAction::id, blender::ID_RECALC_ANIMATION_NO_FLUSH, blender::id_us_min(), and blender::animrig::Action::is_empty().
Referenced by animdata_remove_empty_action().
|
static |
This function assumes that the quaternion keys are sequential. They do not have to be in array_index order.
Definition at line 186 of file pose.cc.
References animsys_blend_fcurves_quaternion(), animsys_quaternion_evaluate_fcurves(), blender::BLI_assert(), blender::interp_qt_qtqt(), blender::RNA_property_float_get_array(), blender::RNA_property_float_set_array(), and blender::Span< T >::size().
Referenced by animsys_blend_fcurves_quaternion(), and blend_rotation().
|
static |
Definition at line 299 of file pose.cc.
References animsys_blend_in_fcurves(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_animsys_rna_path_resolve(), blender::BKE_animsys_write_to_rna_path(), blend_rotation(), blend_rotation_with_conversion(), blender::BLI_assert(), BLI_assert_msg, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::AnimationEvalContext::eval_time, get_fcurve_blend_value(), get_rotation_mode_from_path(), get_rotation_mode_from_rna_pointer(), is_fcurve_evaluatable(), is_rotation_path(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::RNA_path_resolve_property(), and rotation_mode_is_euler().
Referenced by animsys_blend_in_fcurves(), and blend_in_action().
|
static |
Definition at line 119 of file evaluation.cc.
References animsys_construct_orig_pointer_rna(), BLI_assert_msg, blender::PointerRNA::data, blender::ID::orig_id, and blender::PointerRNA::owner_id.
Referenced by animsys_construct_orig_pointer_rna(), and animsys_write_orig_anim_rna().
|
static |
This function assumes that the quaternion keys are sequential. They do not have to be in array_index order. If the quaternion is only partially keyed, the result is normalized. If it is fully keyed, the result is returned as-is.
Definition at line 152 of file pose.cc.
References animsys_quaternion_evaluate_fcurves(), blender::BLI_assert(), blender::calculate_fcurve(), blender::normalize_qt(), blender::PathResolvedRNA::prop, blender::PathResolvedRNA::prop_index, blender::PathResolvedRNA::ptr, and blender::Span< T >::size().
Referenced by animsys_blend_fcurves_quaternion(), and animsys_quaternion_evaluate_fcurves().
|
static |
Definition at line 136 of file evaluation.cc.
References animsys_construct_orig_pointer_rna(), animsys_write_orig_anim_rna(), blender::BKE_animsys_rna_path_resolve(), and blender::BKE_animsys_write_to_rna_path().
Referenced by animsys_write_orig_anim_rna(), and apply_evaluation_result().
Definition at line 434 of file pose.cc.
References any_bone_selected(), blender::bPoseChannel::flag, and blender::POSE_SELECTED.
Return true if any bone is selected. This is useful to decide if all bones should be affected or not.
References any_bone_selected(), and get_best_pose_slot_for_id().
Referenced by any_bone_selected(), any_bone_selected(), and pose_apply_action().
| void blender::animrig::apply_evaluation_result | ( | const EvaluationResult & | evaluation_result, |
| PointerRNA & | animated_id_ptr, | ||
| bool | flush_to_original ) |
Apply the result of the animation evaluation to the given data-block.
| flush_to_original | when true, look up the original data-block (assuming the given one is an evaluated copy) and update that too. |
Definition at line 213 of file evaluation.cc.
References animsys_write_orig_anim_rna(), apply_evaluation_result(), blender::animrig::PropIdentifier::array_index, blender::BKE_animsys_write_to_rna_path(), blender::animrig::EvaluationResult::items(), blender::animrig::AnimatedProperty::prop_rna, blender::animrig::PropIdentifier::rna_path, and blender::animrig::AnimatedProperty::value.
Referenced by apply_evaluation_result(), and evaluate_and_apply_action().
| int blender::animrig::apply_keyingset | ( | bContext * | C, |
| Vector< PointerRNA > * | sources, | ||
| KeyingSet * | keyingset, | ||
| ModifyKeyMode | mode, | ||
| float | cfra ) |
Use the specified KeyingSet and context info (if required) to add/remove various Keyframes on the specified frame.
Modify keyframes for the channels specified by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.
Definition at line 409 of file animrig/intern/keyingsets.cc.
References apply_keyingset(), blender::KS_Path::array_index, blender::BKE_id_is_editable(), blender::BKE_reportf(), blender::BLI_assert(), C, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_reports(), DELETE_KEY, get_keyframing_flags(), blender::KS_Path::id, INSERT, insert_key_to_keying_set_path(), blender::INSERTKEY_NOFLAGS, blender::KeyingSet::keyingflag, blender::KeyingSet::keyingoverride, keyingset_apply_keying_flags(), blender::KeyingSet::name, blender::KeyingSet::paths, blender::KS_Path::rna_path, blender::RPT_WARNING, SUCCESS, and validate_keyingset().
Referenced by apply_keyingset(), autokeyframe_object(), autokeyframe_object(), autokeyframe_pchan(), autokeyframe_pose_channel(), blender::delete_key_using_keying_set(), blender::insert_key_with_keyingset(), and blender::pose_clear_transform_generic_exec().
| int blender::animrig::armature_bonecoll_child_number_find | ( | const bArmature * | armature, |
| const BoneCollection * | bcoll ) |
Find the child number of this bone collection.
This is the offset of this collection relative to the parent's first child. In other words, the first child has number 0, second child has number 1, etc.
This requires a scan of the array, hence the function is called 'find' and not 'get'.
Definition at line 1181 of file animrig/intern/bone_collections.cc.
References armature_bonecoll_child_number_find(), armature_bonecoll_find_index(), armature_bonecoll_find_parent_index(), and blender::bonecoll_child_number().
Referenced by armature_bonecoll_child_number_find(), and blender::bone_collection_add_exec().
| int blender::animrig::armature_bonecoll_child_number_set | ( | bArmature * | armature, |
| blender::BoneCollection * | bcoll, | ||
| int | new_child_number ) |
Move this bone collection to a new child number.
Definition at line 1189 of file animrig/intern/bone_collections.cc.
References blender::bke::bArmature_Runtime::active_collection_index, blender::ANIM_armature_bonecoll_active_index_set(), armature_bonecoll_child_number_set(), armature_bonecoll_find_index(), armature_bonecoll_find_parent_index(), blender::animrig::internal::bonecolls_move_to_index(), blender::BoneCollection::child_count, blender::BoneCollection::child_index, blender::bArmature::collection_array, blender::bArmature::collection_root_count, and blender::bArmature::runtime.
Referenced by armature_bonecoll_child_number_set(), blender::bone_collection_add_exec(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| int blender::animrig::armature_bonecoll_find_index | ( | const bArmature * | armature, |
| const BoneCollection * | bcoll ) |
Return the index of the given collection in the armature's collection array, or -1 if not found.
Definition at line 1147 of file animrig/intern/bone_collections.cc.
References armature_bonecoll_find_index().
Referenced by blender::ANIM_armature_bonecoll_active_set(), blender::ANIM_armature_bonecoll_insert_copy_after(), blender::ANIM_armature_bonecoll_move(), blender::ANIM_armature_bonecoll_remove(), armature_bonecoll_child_number_find(), armature_bonecoll_child_number_set(), armature_bonecoll_find_index(), blender::join_armature_remap_collection(), blender::liboverride_recursively_add_children(), blender::mirror_bone_collection_assignments(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| int blender::animrig::armature_bonecoll_find_parent_index | ( | const bArmature * | armature, |
| int | bcoll_index ) |
Return the index of the given bone collection's parent, or -1 if it has no parent.
Definition at line 1160 of file animrig/intern/bone_collections.cc.
References armature_bonecoll_find_parent_index().
Referenced by blender::ANIM_armature_bonecoll_move_before_after_index(), blender::ANIM_armature_bonecoll_move_to_index(), blender::ANIM_armature_bonecoll_remove_from_index(), armature_bonecoll_child_number_find(), armature_bonecoll_child_number_set(), armature_bonecoll_find_parent_index(), blender::bone_collection_add_exec(), blender::join_armature_remap_collection(), blender::mirror_bone_collection_assignments(), blender::ui::bonecollections::BoneCollectionDropTarget::on_drop(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::armature_bonecoll_is_child_of | ( | const bArmature * | armature, |
| int | potential_parent_index, | ||
| int | potential_child_index ) |
Definition at line 1237 of file animrig/intern/bone_collections.cc.
References armature_bonecoll_is_child_of(), armature_bonecoll_is_root(), blender::BoneCollection::child_count, blender::BoneCollection::child_index, and blender::bArmature::collection_array.
Referenced by blender::ANIM_armature_bonecoll_move_to_index(), blender::ANIM_armature_bonecoll_remove_from_index(), armature_bonecoll_is_child_of(), armature_bonecoll_is_descendant_of(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::armature_bonecoll_is_descendant_of | ( | const bArmature * | armature, |
| int | potential_parent_index, | ||
| int | potential_descendant_index ) |
Definition at line 1256 of file animrig/intern/bone_collections.cc.
References armature_bonecoll_is_child_of(), armature_bonecoll_is_descendant_of(), BLI_assert_msg, blender::BoneCollection::child_count, blender::BoneCollection::child_index, and blender::bArmature::collection_array.
Referenced by armature_bonecoll_is_descendant_of(), and blender::ui::bonecollections::BoneCollectionDropTarget::can_drop().
| bool blender::animrig::armature_bonecoll_is_root | ( | const bArmature * | armature, |
| int | bcoll_index ) |
Definition at line 1231 of file animrig/intern/bone_collections.cc.
References armature_bonecoll_is_root(), blender::BLI_assert(), and blender::bArmature::collection_root_count.
Referenced by blender::ANIM_armature_bonecoll_insert_copy_after(), armature_bonecoll_is_child_of(), armature_bonecoll_is_root(), and blender::animrig::tests::TEST_F().
| int blender::animrig::armature_bonecoll_move_to_parent | ( | bArmature * | armature, |
| int | from_bcoll_index, | ||
| int | to_child_num, | ||
| int | from_parent_index, | ||
| int | to_parent_index ) |
Move a bone collection from one parent to another.
| from_bcoll_index | Index of the bone collection to move. |
| to_child_num | Gap index of where to insert the collection; 0 to make it the first child, and parent->child_count to make it the last child. -1 also works as an indicator for the last child, as that makes it possible to call this function without requiring the caller to find the BoneCollection* of the parent. |
| from_parent_index | Index of its current parent (-1 if it is a root collection). |
| to_parent_index | Index of the new parent (-1 if it is to become a root collection). |
Definition at line 1325 of file animrig/intern/bone_collections.cc.
References blender::ancestors_visible_update(), armature_bonecoll_move_to_parent(), blender::BLI_assert(), BLI_assert_msg, blender::animrig::internal::bonecolls_move_to_index(), blender::BoneCollection::child_count, blender::BoneCollection::child_index, blender::bArmature::collection_array, blender::bArmature::collection_array_num, blender::bArmature::collection_root_count, and blender::BoneCollection::flags.
Referenced by blender::ANIM_armature_bonecoll_move_before_after_index(), blender::ANIM_armature_bonecoll_remove_from_index(), armature_bonecoll_move_to_parent(), blender::ui::bonecollections::BoneCollectionDropTarget::on_drop(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
static |
Moves the given (end exclusive) range to index to, shifting other items before/after to make room.
The range is moved such that the start ends up at to.
to must be far away enough from the end of the array for the entire range to be moved there without spilling over the end of the array.
Definition at line 190 of file animrig/intern/action.cc.
References array_shift_range(), blender::BLI_assert(), ELEM, blender::num, T, and UNUSED_VARS_NDEBUG.
Referenced by array_shift_range(), blender::animrig::Channelbag::channel_group_move_to_index(), blender::animrig::Channelbag::channel_group_remove(), blender::animrig::Channelbag::fcurve_assign_to_channel_group(), blender::animrig::Channelbag::fcurve_create_many(), blender::animrig::Channelbag::fcurve_move_to_index(), blender::animrig::Channelbag::fcurve_ungroup(), and blender::animrig::Action::slot_move_to_index().
| void blender::animrig::assert_baklava_phase_1_invariants | ( | const Action & | action | ) |
Assert the invariants of Project Baklava phase 1.
For an action the invariants are that it:
For a layer the invariants are that it:
For a strip the invariants are that it:
This simultaneously serves as a todo marker for later phases of Project Baklava and ensures that the phase-1 invariants hold at runtime.
TODO: these functions should be changed to assert fewer and fewer assumptions as we progress through the phases of Project Baklava and more and more of the new animation system is implemented. Finally, they should be removed entirely when the full system is completely implemented.
Definition at line 2961 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), blender::BLI_assert(), blender::animrig::Action::layer(), and blender::animrig::Action::layers().
Referenced by blender::bke::action_blend_write(), action_channelbag_ensure(), blender::seq::animation_backup_original(), blender::seq::animation_restore_original(), assert_baklava_phase_1_invariants(), assert_baklava_phase_1_invariants(), assert_baklava_phase_1_invariants(), channelbag_for_action_slot(), fcurve_find_in_action(), fcurves_for_action_slot(), fcurves_for_action_slot(), foreach_fcurve_in_action_slot_editable(), blender::animrig::Action::get_layer_for_keyframing(), insert_key_layer(), blender::animrig::Action::layer_keystrip_ensure(), and move_slot().
| void blender::animrig::assert_baklava_phase_1_invariants | ( | const Layer & | layer | ) |
Assert the invariants of Project Baklava phase 1.
For an action the invariants are that it:
For a layer the invariants are that it:
For a strip the invariants are that it:
This simultaneously serves as a todo marker for later phases of Project Baklava and ensures that the phase-1 invariants hold at runtime.
TODO: these functions should be changed to assert fewer and fewer assumptions as we progress through the phases of Project Baklava and more and more of the new animation system is implemented. Finally, they should be removed entirely when the full system is completely implemented.
Definition at line 2971 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), blender::BLI_assert(), and layer.
| void blender::animrig::assert_baklava_phase_1_invariants | ( | const Strip & | strip | ) |
Assert the invariants of Project Baklava phase 1.
For an action the invariants are that it:
For a layer the invariants are that it:
For a strip the invariants are that it:
This simultaneously serves as a todo marker for later phases of Project Baklava and ensures that the phase-1 invariants hold at runtime.
TODO: these functions should be changed to assert fewer and fewer assumptions as we progress through the phases of Project Baklava and more and more of the new animation system is implemented. Finally, they should be removed entirely when the full system is completely implemented.
Definition at line 2981 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), blender::BLI_assert(), blender::ActionStrip::frame_offset, blender::animrig::Strip::is_infinite(), blender::animrig::Strip::Keyframe, blender::animrig::Strip::type(), and UNUSED_VARS_NDEBUG.
This will make a best-effort guess as to which slot to use, in this order;
Definition at line 1166 of file animrig/intern/action.cc.
References assign_action(), and blender::BKE_animdata_ensure_id().
Referenced by blender::action_stash_create_exec(), blender::animdata_copy_id_action(), assign_action(), assign_action(), assign_action_and_slot(), assign_action_ensure_slot_for_keying(), blender::BKE_animdata_set_action(), blender::ensure_animdata_pair(), blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize(), id_action_ensure(), blender::io::fbx::import_animations(), blender::replace_action_on_id(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::bke::tests::TEST_F(), unassign_action(), and unassign_action().
|
nodiscard |
Same as assign_action(action, id) above.
Use this function when you already have the AnimData struct of this ID.
Definition at line 1175 of file animrig/intern/action.cc.
References blender::AnimData::action, blender::OwnedAnimData::adt, assign_action(), blender::BKE_animdata_action_editable(), blender::BKE_report(), generic_assign_action(), blender::AnimData::last_slot_identifier, blender::OwnedAnimData::owner_id, blender::RPT_ERROR, and blender::AnimData::slot_handle.
| ActionSlotAssignmentResult blender::animrig::assign_action_and_slot | ( | Action * | action, |
| Slot * | slot_to_assign, | ||
| ID & | animated_id ) |
Utility function that assigns both an Action and a slot of that Action.
Returns the result of the underlying assign_action_slot() call.
Definition at line 1502 of file animrig/intern/action.cc.
References assign_action(), assign_action_and_slot(), assign_action_slot(), and MissingAction.
Referenced by assign_action_and_slot(), blender::BKE_nla_tweakmode_enter(), blender::animrig::tests::AnimationEvaluationTest::SetUp(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::editor::animation::tests::TEST_F(), and blender::editor::animation::tests::TEST_F().
|
nodiscard |
Assign the Action, ensuring that a Slot is also assigned.
If this Action happens to already be assigned, and a Slot is assigned too, that Slot is returned. Otherwise a new Slot is created + assigned.
Definition at line 1209 of file animrig/intern/action.cc.
References blender::AnimData::action, assign_action(), assign_action_ensure_slot_for_keying(), assign_action_slot(), blender::BKE_animdata_from_id(), BLI_assert_unreachable, generic_slot_for_autoassign(), blender::ActionSlot::handle, blender::animrig::Slot::has_idtype(), blender::animrig::Slot::is_suitable_for(), blender::AnimData::last_slot_identifier, OK, blender::animrig::Action::slot(), blender::animrig::Action::slot_add_for_id(), blender::animrig::Action::slot_for_handle(), blender::AnimData::slot_handle, and blender::animrig::Action::slots().
Referenced by action_channelbag_ensure(), assign_action_ensure_slot_for_keying(), blender::io::fbx::create_material_curves(), prep_action_layer_for_keying(), blender::ed::vse::sequencer_paste_animation(), blender::ed::vse::sequencer_write_copy_paste_file(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| ActionSlotAssignmentResult blender::animrig::assign_action_slot | ( | Slot * | slot_to_assign, |
| ID & | animated_id ) |
Definition at line 1491 of file animrig/intern/action.cc.
References blender::AnimData::action, assign_action_slot(), blender::BKE_animdata_from_id(), generic_assign_action_slot(), blender::AnimData::last_slot_identifier, MissingAction, and blender::AnimData::slot_handle.
Referenced by assign_action_and_slot(), assign_action_ensure_slot_for_keying(), assign_action_slot(), blender::io::fbx::import_animations(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
nodiscard |
Same as assign_action, except it assigns to #AnimData::tmpact and #AnimData::tmp_slot_handle.
Definition at line 1190 of file animrig/intern/action.cc.
References blender::OwnedAnimData::adt, assign_tmpaction(), generic_assign_action(), blender::OwnedAnimData::owner_id, blender::AnimData::tmp_last_slot_identifier, blender::AnimData::tmp_slot_handle, and blender::AnimData::tmpact.
Referenced by blender::animdata_copy_id_action(), assign_tmpaction(), assign_tmpaction_and_slot_handle(), blender::BKE_animdata_free(), and blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize().
|
nodiscard |
Definition at line 1512 of file animrig/intern/action.cc.
References blender::OwnedAnimData::adt, assign_tmpaction(), assign_tmpaction_and_slot_handle(), generic_assign_action_slot_handle(), MissingAction, blender::OwnedAnimData::owner_id, blender::AnimData::tmp_last_slot_identifier, blender::AnimData::tmp_slot_handle, and blender::AnimData::tmpact.
Referenced by assign_tmpaction_and_slot_handle(), and blender::BKE_nla_tweakmode_enter().
Checks whether the Action assigned to adt (if any) has any keyframes at the given frame. Since we're only concerned whether a keyframe exists, we can simply loop until a match is found.
For layered actions, this only checks for keyframes in the assigned slot.
Definition at line 310 of file animrig/intern/keyframing.cc.
References blender::ACT_MUTED, blender::AnimData::action, assigned_action_has_keyframe_at(), fcurves_for_assigned_action(), blender::bAction::flag, blender::Span< T >::index_range(), blender::threading::parallel_reduce(), and blender::Span< T >::slice().
Referenced by assigned_action_has_keyframe_at(), id_frame_has_keyframe(), and object_frame_has_keyframe().
Auto-keyframing feature - checks for whether anything should be done for the current frame.
Definition at line 76 of file keyframing_auto.cc.
References blender::ToolSettings::autokey_mode, blender::AUTOKEY_MODE_EDITKEYS, blender::AUTOKEY_MODE_NORMAL, autokeyframe_cfra_can_key(), blender::BKE_scene_frame_get(), id_frame_has_keyframe(), is_autokey_mode(), is_autokey_on(), and blender::Scene::toolsettings.
Referenced by autokeyframe_cfra_can_key(), autokeyframe_object(), autokeyframe_object(), autokeyframe_pchan(), autokeyframe_pose_channel(), autokeyframe_property(), blender::ed::transform::drawTransformPixel(), blender::ED_view3d_camera_autokey(), blender::ed::transform::motionpath_need_update_object(), blender::ed::transform::motionpath_need_update_pose(), blender::pose_clear_transform_generic_exec(), blender::poselib_keytag_pose(), and blender::slide_subjects_autokey().
| void blender::animrig::autokeyframe_object | ( | bContext * | C, |
| const Scene * | scene, | ||
| Object * | ob, | ||
| Span< RNAPath > | rna_paths ) |
Insert keyframes on the given object ob based on the auto-keying settings.
| rna_paths | Only inserts keys on those RNA paths. |
Definition at line 102 of file keyframing_auto.cc.
References apply_keyingset(), blender::AUTOKEY_FLAG_ONLYKEYINGSET, autokeyframe_cfra_can_key(), autokeyframe_object(), blender::BKE_animsys_eval_context_construct(), blender::BKE_scene_frame_get(), blender::BLI_assert(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_wm_reports(), blender::AnimationEvalContext::eval_time, blender::animrig::CombinedKeyingResult::generate_reports(), get_autokey_flags(), blender::animrig::CombinedKeyingResult::get_count(), blender::Object::id, INSERT, insert_keyframes(), is_keying_flag(), blender::ToolSettings::keyframe_type, blender::animrig::CombinedKeyingResult::merge(), relative_keyingset_add_source(), blender::result, scene_get_active_keyingset(), SUCCESS, and blender::Scene::toolsettings.
Referenced by autokeyframe_object(), autokeyframe_object(), blender::ed::transform::autokeyframe_object(), blender::ED_view3d_camera_autokey(), blender::ed::object::object_clear_transform_generic_exec(), blender::slide_subjects_autokey(), blender::snap_sel_to_grid_exec(), and blender::snap_selected_to_location_rotation().
| bool blender::animrig::autokeyframe_object | ( | bContext * | C, |
| Scene * | scene, | ||
| Object * | ob, | ||
| KeyingSet * | ks ) |
Auto-keyframing feature - for objects
Definition at line 157 of file keyframing_auto.cc.
References apply_keyingset(), autokeyframe_cfra_can_key(), autokeyframe_object(), blender::BKE_scene_frame_get(), C, blender::Object::id, INSERT, and relative_keyingset_add_source().
| bool blender::animrig::autokeyframe_pchan | ( | bContext * | C, |
| Scene * | scene, | ||
| Object * | ob, | ||
| bPoseChannel * | pchan, | ||
| KeyingSet * | ks ) |
Definition at line 175 of file keyframing_auto.cc.
References apply_keyingset(), autokeyframe_cfra_can_key(), autokeyframe_pchan(), blender::BKE_scene_frame_get(), C, blender::Object::id, INSERT, and relative_keyingset_add_source().
Referenced by autokeyframe_pchan(), blender::pose_paste_exec(), blender::snap_sel_to_grid_exec(), and blender::snap_selected_to_location_rotation().
| void blender::animrig::autokeyframe_pose_channel | ( | bContext * | C, |
| Scene * | scene, | ||
| Object * | ob, | ||
| bPoseChannel * | pose_channel, | ||
| Span< RNAPath > | rna_paths, | ||
| short | targetless_ik ) |
Auto-keyframing feature - for poses/pose-channels
| rna_paths | Only inserts keys on those RNA paths. |
| targetless_ik | Has targetless ik been done on any channels? |
Definition at line 193 of file keyframing_auto.cc.
References apply_keyingset(), blender::AUTOKEY_FLAG_ONLYKEYINGSET, autokeyframe_cfra_can_key(), autokeyframe_pose_channel(), blender::BKE_animsys_eval_context_construct(), blender::BKE_scene_frame_get(), blender::BLI_assert(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_wm_reports(), blender::AnimationEvalContext::eval_time, blender::animrig::CombinedKeyingResult::generate_reports(), get_autokey_flags(), blender::animrig::CombinedKeyingResult::get_count(), blender::Object::id, INSERT, insert_keyframes(), blender::INSERTKEY_MATRIX, is_keying_flag(), blender::ToolSettings::keyframe_type, blender::animrig::CombinedKeyingResult::merge(), relative_keyingset_add_source(), blender::result, scene_get_active_keyingset(), SUCCESS, and blender::Scene::toolsettings.
Referenced by blender::ed::transform::autokeyframe_pose(), autokeyframe_pose_channel(), blender::pose_flip_quats_exec(), blender::poselib_keytag_pose(), and blender::slide_subjects_autokey().
| bool blender::animrig::autokeyframe_property | ( | bContext * | C, |
| Scene * | scene, | ||
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | rnaindex, | ||
| float | cfra, | ||
| bool | only_if_property_keyed ) |
Use for auto-key-framing.
| only_if_property_keyed | if true, auto-key-framing only creates keyframes on already keyed properties. This is by design when using buttons. For other callers such as gizmos or sequencer preview transform, creating new animation/keyframes also on non-keyed properties is desired. |
Definition at line 260 of file keyframing_auto.cc.
References blender::FCurve::array_index, autokeyframe_cfra_can_key(), autokeyframe_property(), blender::BKE_animsys_eval_context_construct(), blender::BKE_fcurve_find_by_rna_context_ui(), blender::BLI_assert(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_wm_reports(), blender::AnimationEvalContext::eval_time, generate_single_keying_result_report(), get_autokey_flags(), blender::FCurve::grp, insert_keyframe_direct(), insert_keyframes(), is_autokey_on(), blender::ToolSettings::keyframe_type, NA_ADDED, NA_EDITED, blender::bActionGroup::name, NC_ANIMATION, ND_KEYFRAME, blender::PointerRNA::owner_id, blender::result, blender::RNA_id_pointer_create(), blender::RNA_path_from_ID_to_property(), SUCCESS, blender::Scene::toolsettings, and blender::WM_event_add_notifier().
Referenced by autokeyframe_property(), blender::ed::transform::autokeyframe_sequencer_image(), blender::ui::button_anim_autokey(), blender::ui::depthdropper_depth_set(), blender::ed::object::object_transform_axis_target_modal(), blender::ed::outliner::outliner_object_set_flag_recursive_fn(), blender::ui::reset_default_button_exec(), blender::ed::vse::sequencer_strip_transform_clear_exec(), blender::nodes::inverse_eval::set_rna_property(), and blender::WM_gizmo_target_property_anim_autokey().
| void blender::animrig::bake_fcurve | ( | FCurve * | fcu, |
| int2 | range, | ||
| float | step, | ||
| BakeCurveRemove | remove_existing ) |
Creates keyframes in the given range at the given step interval.
| range | start and end frame to bake. Is inclusive on both ends. |
| remove_existing | choice which keys to remove in relation to the given range. |
Definition at line 574 of file animrig/intern/fcurve.cc.
References bake_fcurve(), blender::FCurve::bezt, blender::BKE_bezier_array_merge(), blender::BKE_fcurve_handles_recalc(), blender::BLI_assert(), blender::FCurve::flag, get_keyframe_settings(), initialize_bezt(), blender::MEM_new_array_zeroed(), NONE, remove_fcurve_key_range(), sample_fcurve_segment(), step, and blender::FCurve::totvert.
Referenced by bake_fcurve(), blender::bake_rotation_fcurves(), and blender::channels_bake_exec().
| void blender::animrig::bake_fcurve_segments | ( | FCurve * | fcu | ) |
Fill the space between selected keyframes with keyframes on full frames. E.g. With a key selected on frame 1 and 3 it will insert a key on frame 2.
Definition at line 619 of file animrig/intern/fcurve.cc.
References bake_fcurve_segments(), blender::FCurve::bezt, BEZT_ISSEL_ANY, blender::BEZT_KEYTYPE_BREAKDOWN, blender::BKE_fcurve_handles_recalc(), ceil, blender::evaluate_fcurve(), float, floor, get_keyframe_settings(), insert_vert_fcurve(), blender::INSERTKEY_NOFLAGS, blender::animrig::KeyframeSettings::keyframe_type, blender::MEM_new_array_zeroed(), and blender::BezTriple::vec.
Referenced by blender::bake_action_keys(), bake_fcurve_segments(), and blender::bake_graph_keys().
|
static |
Definition at line 389 of file pose.cc.
References animsys_blend_in_fcurves(), blend_in_action(), and fcurves_for_action_slot().
Referenced by blend_in_action(), pose_apply_action_blend(), and pose_apply_action_blend_all_bones().
| void blender::animrig::blend_layer_results | ( | EvaluationResult & | final_result, |
| const EvaluationResult & | intermediate_result, | ||
| const Layer & | current_layer ) |
Blend the intermediate_result into the final_result based on the layer weight and mix mode.
Definition at line 255 of file evaluation.cc.
References blender::animrig::Layer::Add, blender::animrig::PropIdentifier::array_index, blend_layer_results(), blender::ActionLayer::influence, blender::math::interpolate(), blender::animrig::EvaluationResult::items(), blender::animrig::EvaluationResult::lookup_ptr(), blender::animrig::Layer::mix_mode(), blender::animrig::Layer::Multiply, blender::animrig::Layer::Offset, blender::animrig::AnimatedProperty::prop_rna, blender::animrig::Layer::Replace, blender::animrig::PropIdentifier::rna_path, blender::animrig::EvaluationResult::store(), blender::animrig::Layer::Subtract, and blender::animrig::AnimatedProperty::value.
Referenced by blend_layer_results(), and evaluate_action().
|
static |
Definition at line 207 of file pose.cc.
References animsys_blend_fcurves_quaternion(), blender::BKE_animsys_write_to_rna_path(), blend_rotation(), get_fcurve_blend_value(), blender::PathResolvedRNA::prop, blender::PathResolvedRNA::prop_index, blender::PathResolvedRNA::ptr, and blender::ROT_MODE_QUAT.
Referenced by animsys_blend_in_fcurves(), and blend_rotation().
|
static |
Apply the rotation fcurves to the ptr by converting them to a matrix first. This means the rotation can be applied regardless of rotation mode.
| blend_factor | LERP between the current rotation value of the ptr and the value of the rotation_fcurves. A 1 means the rotation_fcurves will be applied at 100%. |
Definition at line 237 of file pose.cc.
References blender::axis_angle_to_quat(), blender::BKE_object_quat_to_rot(), blender::BKE_object_rot_to_quat(), blender::BKE_pchan_quat_to_rot(), blender::BKE_pchan_rot_to_quat(), blend_rotation_with_conversion(), BLI_assert_msg, BLI_assert_unreachable, blender::copy_qt_qt(), blender::PointerRNA::data, blender::eulO_to_quat(), blender::evaluate_fcurve(), blender::interp_qt_qtqt(), blender::ROT_MODE_AXISANGLE, blender::ROT_MODE_EUL, blender::ROT_MODE_QUAT, blender::ROT_MODE_XYZ, and blender::PointerRNA::type.
Referenced by animsys_blend_in_fcurves(), and blend_rotation_with_conversion().
|
inline |
Definition at line 86 of file ANIM_armature.hh.
References bone_deselect(), blender::bPoseChannel::flag, and blender::POSE_SELECTED_ALL.
Referenced by blender::bone_collection_select(), bone_deselect(), blender::deselect_pose_bones(), blender::ED_armature_pose_select_pick_bone(), blender::ED_pose_bone_select(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), blender::ed::outliner::pchan_fn(), blender::pose_copy_exec(), blender::pose_do_bone_select(), blender::pose_hide_exec(), blender::pose_select_connected_invoke(), blender::pose_select_same_collection(), blender::pose_select_same_color(), blender::pose_select_same_keyingset(), blender::selectconnected_posebonechildren(), and blender::ed::outliner::tree_element_posechannel_activate().
|
inline |
Definition at line 62 of file ANIM_armature.hh.
References blender::bke::PChanBoneT< PoseChannelT, BoneT >::bone, bone_is_selectable(), bone_is_visible(), blender::BONE_UNSELECTABLE, and blender::Bone::flag.
Referenced by bone_is_selectable(), bone_is_selectable(), bone_is_selectable(), blender::do_lasso_select_pose__do_tag(), blender::ed::outliner::do_outliner_bone_select_recursive(), blender::ED_pose_bone_select(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), blender::pose_select_children(), blender::pose_select_linked_exec(), blender::pose_select_mirror_exec(), blender::pose_select_parents(), blender::pose_select_same_keyingset(), and blender::pose_select_siblings().
Definition at line 71 of file ANIM_armature.hh.
References bone_is_selectable(), bone_is_visible(), blender::BONE_UNSELECTABLE, and blender::Bone::flag.
|
inline |
Definition at line 66 of file ANIM_armature.hh.
References bone_is_selectable().
|
inline |
Definition at line 52 of file ANIM_armature.hh.
References bone_is_selected(), bone_is_visible(), blender::bPoseChannel::flag, blender::bke::PChanBoneT< PoseChannelT, BoneT >::pchan, and blender::POSE_SELECTED.
Returns true if the bone is selected. This includes a visibility check because invisible bones cannot be selected, no matter their flag.
Definition at line 47 of file ANIM_armature.hh.
References bone_is_selected(), bone_is_visible(), blender::BONE_SELECTED, and blender::Bone::flag.
Referenced by blender::armature_delete_ebone_cb(), blender::armature_delete_selected_exec(), blender::armature_duplicate_selected(), blender::armature_flip_names_exec(), blender::armature_symmetrize_exec(), blender::BKE_pose_channel_active_or_first_selected(), blender::bke::BKE_pose_channel_find_selected_names(), blender::BKE_pose_minmax(), bone_is_selected(), bone_is_selected(), bone_is_selected(), blender::can_delete_key(), blender::ed::animrig::extract_pose(), blender::ed::animrig::generate_path_values(), blender::get_selected_pose_bones(), blender::pose_select_siblings(), blender::pose_visual_transform_apply_exec(), blender::poselib_keytag_pose(), and blender::separate_armature_bones().
|
inline |
Definition at line 57 of file ANIM_armature.hh.
References bone_is_selected(), bone_is_visible(), blender::BONE_SELECTED, and blender::EditBone::flag.
|
inline |
Returns true if the given Bone is visible. This includes bone collection visibility.
Definition at line 25 of file ANIM_armature.hh.
References blender::ANIM_bone_in_visible_collection(), blender::BONE_HIDDEN_P, bone_is_visible(), and blender::Bone::flag.
Referenced by blender::armature_calc_roll_exec(), blender::armature_click_extrude_exec(), blender::armature_dissolve_selected_exec(), blender::armature_duplicate_selected(), blender::armature_edit_select_op_apply(), blender::armature_extrude_exec(), blender::armature_foreachScreenBone(), blender::armature_hide_exec(), blender::armature_roll_clear_exec(), blender::armature_select_linked_exec(), blender::armature_select_mirror_exec(), blender::armature_select_mirrored_ex(), blender::armature_select_more_less(), blender::armature_switch_direction_exec(), blender::armature_symmetrize_exec(), blender::armature_tag_select_mirrored(), blender::BKE_pose_minmax(), blender::bone_collection_assign_editbones(), blender::bone_collection_select(), bone_is_selectable(), bone_is_selectable(), bone_is_selected(), bone_is_selected(), bone_is_selected(), bone_is_visible(), bone_is_visible(), bone_is_visible(), blender::ed::transform::createTransArmatureVerts(), blender::do_circle_select_armature__doSelectBone(), blender::do_circle_select_armature__doSelectBone_clip_content(), blender::do_lasso_select_armature__doSelectBone(), blender::do_lasso_select_armature__doSelectBone_clip_content(), blender::draw::overlay::Armatures::draw_armature_edit(), blender::draw::overlay::Armatures::draw_armature_pose(), blender::ED_armature_ebone_transform_mirror_update(), blender::ED_armature_edit_deselect_all_visible(), blender::ED_pose_deselect_all(), blender::ed_pose_is_any_selected(), blender::ED_transverts_create_from_obedit(), blender::ED_transverts_update_obedit(), blender::ed::transform::getTransformOrientation_ex(), blender::ed::transform::gizmo_3d_foreach_selected(), blender::pose_copy_exec(), blender::pose_foreachScreenBone(), blender::pose_select_mirror_exec(), blender::ed::transform::recalcData_edit_armature(), blender::screen_ctx_selected_bones_(), blender::screen_ctx_visible_or_editable_bones_(), blender::separate_armature_exec(), blender::skip_fcurve_selected_data(), blender::snap_selected_to_location_rotation(), blender::ed::transform::snapArmature(), blender::ed::transform::transform_convert_pose_transflags_update(), blender::ed::outliner::tree_element_bone_activate(), and blender::ed::outliner::tree_element_posechannel_activate().
|
inline |
Definition at line 37 of file ANIM_armature.hh.
References blender::ANIM_bonecoll_is_visible_editbone(), blender::BONE_HIDDEN_A, bone_is_visible(), and blender::EditBone::flag.
|
inline |
Selection and deselection happens with the POSE_SELECTED_ALL flag which includes body tip and root. While tip and root are not individually selectable in pose mode, these flags carry over to edit mode.
Definition at line 81 of file ANIM_armature.hh.
References bone_select(), blender::bPoseChannel::flag, and blender::POSE_SELECTED_ALL.
Referenced by blender::bone_collection_select(), bone_select(), blender::ED_armature_pose_select_pick_bone(), blender::ED_pose_bone_select(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), blender::ed::outliner::pchan_fn(), blender::pose_do_bone_select(), blender::pose_select_connected_invoke(), blender::pose_select_constraint_target_exec(), blender::pose_select_linked_exec(), blender::pose_select_parent_exec(), blender::pose_select_same_collection(), blender::pose_select_same_color(), blender::pose_select_same_keyingset(), blender::selectconnected_posebonechildren(), and blender::ed::outliner::tree_element_posechannel_activate().
| bool blender::animrig::bonecoll_has_children | ( | const BoneCollection * | bcoll | ) |
Definition at line 1281 of file animrig/intern/bone_collections.cc.
References bonecoll_has_children(), and blender::BoneCollection::child_count.
Referenced by bonecoll_has_children(), and blender::move_to_collection_menu_create().
| void blender::animrig::bonecolls_copy_expanded_flag | ( | Span< BoneCollection * > | bcolls_dest, |
| Span< const BoneCollection * > | bcolls_source ) |
For each bone collection in the destination armature, copy its BONE_COLLECTION_EXPANDED flag from the corresponding bone collection in the source armature.
This is used in the handling of undo steps, to ensure that undo'ing does not modify this flag.
Definition at line 1286 of file animrig/intern/bone_collections.cc.
References blender::ANIM_armature_bonecoll_is_expanded_set(), bonecolls_copy_expanded_flag(), blender::bonecolls_get_by_name(), blender::BoneCollection::name, blender::Span< T >::size(), and STREQ.
Referenced by blender::armature_undo_preserve(), bonecolls_copy_expanded_flag(), and blender::undoarm_to_editarm().
| KeyingSet * blender::animrig::builtin_keyingset_get_named | ( | const char | name[] | ) |
Find builtin KeyingSet by name.
Definition at line 116 of file animrig/intern/keyingsets.cc.
References builtin_keyingset_get_named(), blender::builtin_keyingsets, blender::gpu::shader::metadata::printf, and STREQ.
Referenced by builtin_keyingset_get_named(), and get_keyingset_for_autokeying().
| void blender::animrig::channelbag_fcurves_move | ( | Channelbag & | channelbag_dst, |
| Channelbag & | channelbag_src ) |
Moves all F-Curves from one Channelbag to the other.
The Channelbags do not need to be part of the same action, or even belong to an action at all.
If the F-Curves belonged to channel groups, the group membership also carries over to the destination Channelbag. If groups with the same names don't exist, they are created.
The order of existing channel groups in the destination Channelbag are not changed, and any new groups are placed after those in the order they appeared in the src group.
Definition at line 2821 of file animrig/intern/action.cc.
References blender::BLI_assert(), blender::animrig::Channelbag::channel_group_ensure(), channelbag_fcurves_move(), blender::animrig::Channelbag::fcurve(), blender::animrig::Channelbag::fcurve_append(), blender::animrig::Channelbag::fcurve_assign_to_channel_group(), blender::animrig::Channelbag::fcurve_detach(), blender::animrig::Channelbag::fcurves(), blender::FCurve::grp, blender::bActionGroup::name, and UNUSED_VARS_NDEBUG.
Referenced by blender::seq::animation_backup_original(), blender::seq::animation_restore_original(), and channelbag_fcurves_move().
| animrig::Channelbag * blender::animrig::channelbag_for_action_slot | ( | Action & | action, |
| slot_handle_t | slot_handle ) |
Definition at line 2537 of file animrig/intern/action.cc.
References channelbag_for_action_slot().
| const animrig::Channelbag * blender::animrig::channelbag_for_action_slot | ( | const Action & | action, |
| slot_handle_t | slot_handle ) |
Definition at line 2480 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), channelbag_for_action_slot(), blender::animrig::StripKeyframeData::channelbag_for_slot(), blender::animrig::Strip::Keyframe, layer, blender::animrig::Action::layers(), and blender::animrig::Slot::unassigned.
Referenced by blender::bke::action_blend_write(), blender::animrig::legacy::action_fcurves_remove(), blender::ANIM_animfilter_action_slot(), blender::seq::animation_backup_original(), blender::seq::animation_restore_original(), blender::animchannels_group_channels(), blender::animviz_calc_motionpaths(), blender::animrig::legacy::channel_groups_for_assigned_slot(), channelbag_for_action_slot(), channelbag_for_action_slot(), fcurve_find_in_action_slot(), fcurves_for_action_slot(), fcurves_for_action_slot(), blender::rearrange_layered_action_fcurves(), blender::remove_sequencer_fcurves(), blender::update_duplicate_action_constraint_settings(), and blender::what_does_obaction().
|
static |
Definition at line 1731 of file animrig/intern/action.cc.
References channelbag_ptr_destructor().
Referenced by channelbag_ptr_destructor(), and blender::animrig::StripKeyframeData::channelbag_remove().
| Vector< Channelbag * > blender::animrig::channelbags_for_action_slot | ( | Action & | action, |
| slot_handle_t | slot_handle ) |
Definition at line 2507 of file animrig/intern/action.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::animrig::StripKeyframeData::channelbag_for_slot(), channelbags_for_action_slot(), blender::animrig::Strip::Keyframe, layer, blender::animrig::Action::layers(), and blender::animrig::Slot::unassigned.
Referenced by blender::build_rotation_fcurve_map(), and channelbags_for_action_slot().
| int blender::animrig::clear_keyframe | ( | Main * | bmain, |
| ReportList * | reports, | ||
| ID * | id, | ||
| const RNAPath & | rna_path ) |
Main Keyframing API call: Use this when validation of necessary animation data isn't necessary as it already exists. It will clear the current buttons fcurve(s).
Definition at line 570 of file animrig/intern/keyframing.cc.
References blender::AnimData::action, action_fcurve_remove(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_animdata_from_id(), blender::BKE_report(), blender::BKE_reportf(), clear_keyframe(), ELEM, foreach_fcurve_in_action_slot_editable(), blender::if(), blender::RNA_id_pointer_create(), blender::RNA_path_resolve_property(), blender::RPT_ERROR, and blender::AnimData::slot_handle.
Referenced by blender::clear_key_button_exec(), and clear_keyframe().
Clone information from the given slot into this slot while retaining important info like the slot handle and runtime data. This copies the identifier which might clash with other identifiers on the action. Call slot_identifier_ensure_unique after.
Definition at line 2994 of file animrig/intern/action.cc.
References clone_slot(), blender::ActionSlot::handle, and blender::ActionSlot::runtime.
Referenced by clone_slot(), duplicate_slot(), and move_slot().
| FCurve * blender::animrig::create_fcurve_for_channel | ( | const FCurveDescriptor & | fcurve_descriptor | ) |
Create an fcurve for a specific channel, pre-set-up with default flags and interpolation mode.
If the channel's property subtype is provided, the fcurve will also be set to the correct color mode based on user preferences.
Definition at line 56 of file animrig/intern/fcurve.cc.
References blender::animrig::FCurveDescriptor::array_index, blender::FCurve::array_index, blender::FCurve::auto_smoothing, blender::BKE_fcurve_create(), blender::FCurve::color_mode, create_fcurve_for_channel(), blender::FCURVE_COLOR_AUTO_RGB, blender::FCURVE_COLOR_AUTO_YRGB, fcurve_flags_for_property_type(), blender::FCURVE_SELECTED, blender::FCURVE_VISIBLE, blender::FCurve::flag, blender::KEYING_FLAG_XYZ2RGB, blender::PROP_COLOR, blender::PROP_COORDS, blender::PROP_EULER, blender::PROP_QUATERNION, blender::animrig::FCurveDescriptor::prop_subtype, blender::PROP_TRANSLATION, blender::animrig::FCurveDescriptor::prop_type, blender::PROP_XYZ, blender::animrig::FCurveDescriptor::rna_path, and blender::U.
Referenced by blender::convert_rotation_mode_channelbag(), create_fcurve_for_channel(), blender::animrig::Channelbag::fcurve_create(), and blender::animrig::Channelbag::fcurve_create_many().
|
static |
Ensure there are at least two keys in this F-Curve, in order to define A cycle range.
That range does NOT have to be the same as cycle_range – that parameter is only used to insert a 2nd key when there is only one.
Definition at line 2078 of file animrig/intern/action.cc.
References blender::FCurve::bezt, cyclic_keying_ensure_cycle_range_exists(), floorf, MEM_realloc_uninitialized, blender::FCurve::totvert, and blender::BezTriple::vec.
Referenced by cyclic_keying_ensure_cycle_range_exists(), and blender::animrig::StripKeyframeData::keyframe_insert().
|
static |
Definition at line 2053 of file animrig/intern/action.cc.
References blender::add_fmodifier(), cyclic_keying_ensure_modifier(), blender::FMODIFIER_TYPE_CYCLES, and blender::FCurve::modifiers.
Referenced by cyclic_keying_ensure_modifier(), and blender::animrig::StripKeyframeData::keyframe_insert().
| std::optional< StringRefNull > blender::animrig::default_channel_group_for_path | ( | const PointerRNA * | animated_struct, |
| StringRef | prop_rna_path ) |
Return the default channel group name for the given RNA pointer and property path, or none if it has no default.
For example, for object location/rotation/scale this returns the standard "Object Transforms" channel group name.
Definition at line 243 of file animrig/intern/keyframing.cc.
References blender::PointerRNA::data, default_channel_group_for_path(), blender::blender::StringRefBase::find(), blender::bPoseChannel::name, blender::blender::StringRefBase::not_found, and blender::PointerRNA::type.
Referenced by default_channel_group_for_path(), blender::insert_key_button_exec(), and insert_keyframes().
|
static |
Definition at line 478 of file animrig/intern/keyframing.cc.
References blender::AnimData::action, blender::DEG_id_tag_update_ex(), blender::DEG_relations_tag_update(), deg_tag_after_keyframe_delete(), blender::bAction::id, and blender::ID_RECALC_ANIMATION_NO_FLUSH.
Referenced by deg_tag_after_keyframe_delete(), and delete_keyframe().
| int blender::animrig::delete_keyframe | ( | Main * | bmain, |
| ReportList * | reports, | ||
| ID * | id, | ||
| const RNAPath & | rna_path, | ||
| float | cfra ) |
Main Delete Key-Framing API call.
Use this to delete keyframe on current frame for relevant channel. Will perform checks just in case.
Definition at line 492 of file animrig/intern/keyframing.cc.
References blender::AnimData::action, animdata_fcurve_delete(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_animdata_from_id(), blender::BKE_fcurve_is_empty(), blender::BKE_nla_tweakedit_remap(), blender::BKE_report(), blender::BKE_reportf(), blender::BLI_assert(), deg_tag_after_keyframe_delete(), delete_keyframe(), ELEM, fcurve_delete_keyframe_at_time(), fcurve_find(), fcurves_for_action_slot(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::NLATIME_CONVERT_UNMAP, blender::RNA_id_pointer_create(), blender::RNA_path_resolve_property(), blender::RNA_property_array_length(), blender::RPT_ERROR, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::animrig::Action::slot_for_handle(), and blender::AnimData::slot_handle.
Referenced by blender::delete_key_button_exec(), delete_keyframe(), insert_key_to_keying_set_path(), and blender::pyrna_struct_keyframe_delete().
Deletes the keyframe at cfra on fcu if a key exists there, and deletes the fcurve if it was the only keyframe.
Definition at line 128 of file animrig/intern/fcurve.cc.
References animdata_fcurve_delete(), blender::BKE_fcurve_is_empty(), delete_keyframe_fcurve_legacy(), and fcurve_delete_keyframe_at_time().
Referenced by delete_keyframe_fcurve_legacy().
Deselect the keys of all actions in the Span. Duplicate entries are only visited once.
Definition at line 28 of file action_selection.cc.
References action_deselect_keys(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), and deselect_keys_actions().
Referenced by deselect_keys_actions().
Duplicate a slot, and all its animation data.
Data-blocks using the slot are not updated, so the returned slot will be unused.
The action MUST own slot.
Definition at line 3077 of file animrig/intern/action.cc.
References blender::BLI_assert(), clone_slot(), blender::DEG_id_tag_update(), duplicate_slot(), blender::ActionSlot::handle, blender::bAction::id, blender::ID_RECALC_ANIMATION_NO_FLUSH, blender::animrig::Action::slot_add(), blender::animrig::StripKeyframeData::slot_data_duplicate(), slot_identifier_ensure_unique(), blender::animrig::Action::slots(), blender::bAction::strip_keyframe_data_array, and blender::bAction::strip_keyframe_data_array_num.
Referenced by duplicate_slot(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| blender::animrig::ENUM_OPERATORS | ( | Layer::Flags | ) |
References ENUM_OPERATORS().
Referenced by blender::BLI_STATIC_ASSERT(), ENUM_OPERATORS(), ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), blender::ENUM_OPERATORS(), and blender::ENUM_OPERATORS().
| blender::animrig::ENUM_OPERATORS | ( | Slot::Flags | ) |
References ENUM_OPERATORS().
| EvaluationResult blender::animrig::evaluate_action | ( | PointerRNA & | animated_id_ptr, |
| Action & | action, | ||
| slot_handle_t | slot_handle, | ||
| const AnimationEvalContext & | anim_eval_context ) |
Evaluate the given action for the given slot and animated ID.
This does not apply the resulting values to the ID. Instead, it returns the resulting values in an EvaluationResult.
Definition at line 48 of file evaluation.cc.
References blend_layer_results(), evaluate_action(), blender::animrig::internal::evaluate_layer(), layer, blender::animrig::Action::layers(), and blender::result.
Referenced by evaluate_action(), and evaluate_and_apply_action().
| void blender::animrig::evaluate_and_apply_action | ( | PointerRNA & | animated_id_ptr, |
| Action & | action, | ||
| slot_handle_t | slot_handle, | ||
| const AnimationEvalContext & | anim_eval_context, | ||
| bool | flush_to_original ) |
Top level animation evaluation function.
Animate the given ID, using the layered Action and the given slot.
| flush_to_original | when true, look up the original data-block (assuming the given one is an evaluated copy) and update that too. |
Definition at line 83 of file evaluation.cc.
References apply_evaluation_result(), evaluate_action(), and evaluate_and_apply_action().
Referenced by blender::BKE_animsys_evaluate_animdata(), and evaluate_and_apply_action().
| float blender::animrig::evaluate_driver_from_rna_pointer | ( | const AnimationEvalContext * | anim_eval_context, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| const FCurve * | fcu ) |
Evaluates the driver on the frame given in anim_eval_context and returns the value. Returns 0 if the RNA path can't be resolved.
Definition at line 16 of file driver.cc.
References blender::FCurve::array_index, blender::FCurve::driver, blender::evaluate_driver(), evaluate_driver_from_rna_pointer(), and blender::RNA_path_resolved_create().
Referenced by evaluate_driver_from_rna_pointer(), and blender::insert_key_button_exec().
|
static |
Definition at line 151 of file evaluation.cc.
References blender::FCurve::array_index, blender::BKE_animsys_rna_path_resolve(), blender::animrig::StripKeyframeData::channelbag_for_slot(), evaluate_keyframe_data(), blender::animrig::Channelbag::fcurves(), blender::Span< T >::index_range(), is_fcurve_evaluatable(), blender::threading::parallel_for(), and blender::Span< T >::size().
Referenced by evaluate_keyframe_data(), and evaluate_strip().
|
static |
Definition at line 234 of file evaluation.cc.
References blender::animrig::Strip::data(), blender::AnimationEvalContext::eval_time, evaluate_keyframe_data(), evaluate_strip(), blender::ActionStrip::frame_offset, blender::animrig::Strip::Keyframe, and blender::animrig::Strip::type().
Referenced by blender::animrig::internal::evaluate_layer(), and evaluate_strip().
Delete the keyframe at time on fcurve if a key exists there.
This does NOT delete the FCurve if it ends up empty. That is for the caller to do.
Definition at line 109 of file animrig/intern/fcurve.cc.
References blender::FCurve::bezt, blender::BKE_fcurve_bezt_binarysearch_index(), blender::BKE_fcurve_delete_key(), blender::BKE_fcurve_handles_recalc(), blender::BKE_fcurve_is_protected(), fcurve_delete_keyframe_at_time(), and blender::FCurve::totvert.
Referenced by blender::delete_key_v3d_without_keying_set(), blender::delete_key_vse_without_keying_set(), delete_keyframe(), delete_keyframe_fcurve_legacy(), and fcurve_delete_keyframe_at_time().
| const FCurve * blender::animrig::fcurve_find | ( | Span< const FCurve * > | fcurves, |
| const FCurveDescriptor & | fcurve_descriptor ) |
Return the first fcurve in fcurves that matches fcurve_descriptor.
If no matching fcurve is found, returns nullptr.
Definition at line 38 of file animrig/intern/fcurve.cc.
References blender::animrig::FCurveDescriptor::array_index, fcurve_find(), and blender::animrig::FCurveDescriptor::rna_path.
Referenced by delete_keyframe(), blender::animrig::Channelbag::fcurve_find(), blender::animrig::Channelbag::fcurve_find(), fcurve_find(), and fcurve_find().
| FCurve * blender::animrig::fcurve_find | ( | Span< FCurve * > | fcurves, |
| const FCurveDescriptor & | fcurve_descriptor ) |
Definition at line 50 of file animrig/intern/fcurve.cc.
References blender::Span< T >::cast(), and fcurve_find().
| const FCurve * blender::animrig::fcurve_find_by_rna_path | ( | const AnimData & | adt, |
| StringRefNull | rna_path, | ||
| int | array_index ) |
Compatibility helper function for BKE_animadata_fcurve_find_by_rna_path().
Searches each layer (top to bottom) to find an FCurve that matches the given RNA path & index.
This function should probably be limited to the active layer (for the given property, once pinning to layers is there), so that the "this is keyed" color is more accurate.
Again, this is just to hook up the layered Action to the old Blender UI code.
Definition at line 297 of file animdata.cc.
References blender::AnimData::action, blender::BLI_assert(), blender::animrig::StripKeyframeData::channelbag_for_slot(), fcurve_find_by_rna_path(), blender::animrig::Strip::Keyframe, blender::animrig::Action::layer(), layer, blender::bAction::layer_array_num, blender::animrig::Action::slot_for_handle(), and blender::AnimData::slot_handle.
Referenced by fcurve_find_by_rna_path().
| FCurve * blender::animrig::fcurve_find_in_action | ( | bAction * | act, |
| const FCurveDescriptor & | fcurve_descriptor ) |
Find the F-Curve in the given Action.
All the Action slots are searched for this F-Curve. To limit to a single slot, use fcurve_find_in_action_slot().
Definition at line 2564 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), blender::animrig::StripKeyframeData::channelbags(), blender::animrig::Strip::data(), fcurve_find_in_action(), blender::animrig::Action::layer(), and layer.
Referenced by fcurve_find_in_action(), and insert_keyframes().
| FCurve * blender::animrig::fcurve_find_in_action_slot | ( | bAction * | act, |
| slot_handle_t | slot_handle, | ||
| const FCurveDescriptor & | fcurve_descriptor ) |
Find the F-Curve in the given Action Slot.
Definition at line 2598 of file animrig/intern/action.cc.
References channelbag_for_action_slot(), blender::animrig::Channelbag::fcurve_find(), and fcurve_find_in_action_slot().
Referenced by blender::BKE_animadata_fcurve_find_by_rna_path(), fcurve_find_in_action_slot(), and fcurve_find_in_assigned_slot().
| FCurve * blender::animrig::fcurve_find_in_assigned_slot | ( | AnimData & | adt, |
| const FCurveDescriptor & | fcurve_descriptor ) |
Find the F-Curve in the Action Slot assigned to this ADT.
Definition at line 2593 of file animrig/intern/action.cc.
References blender::AnimData::action, fcurve_find_in_action_slot(), fcurve_find_in_assigned_slot(), and blender::AnimData::slot_handle.
Referenced by fcurve_find_in_assigned_slot(), blender::ed::object::followpath_path_animate_exec(), and blender::make_new_animlistelem().
| eFCurve_Flags blender::animrig::fcurve_flags_for_property_type | ( | PropertyType | prop_type | ) |
Determine the F-Curve flags suitable for animating an RNA property of the given type.
Definition at line 92 of file animrig/intern/fcurve.cc.
References blender::FCURVE_DISCRETE_VALUES, fcurve_flags_for_property_type(), blender::FCURVE_INT_VALUES, blender::PROP_FLOAT, and blender::PROP_INT.
Referenced by create_fcurve_for_channel(), fcurve_flags_for_property_type(), and update_autoflags_fcurve_direct().
Checks if some F-Curve has a keyframe for a given frame.
| frame | The frame on which to check for a keyframe. A binary search with a threshold is used to find the key, so the float doesn't need to match exactly. |
Definition at line 695 of file animrig/intern/fcurve.cc.
References blender::FCurve::bezt, blender::BKE_fcurve_bezt_binarysearch_index(), ELEM, fcurve_frame_has_keyframe(), blender::FCURVE_MUTED, blender::FCurve::flag, and blender::FCurve::totvert.
Referenced by blender::achannel_setting_slider_cb(), blender::achannel_setting_slider_nla_curve_cb(), blender::ui::button_anim_flag(), and fcurve_frame_has_keyframe().
| bool blender::animrig::fcurve_matches_collection_path | ( | const FCurve & | fcurve, |
| StringRefNull | collection_rna_path, | ||
| StringRefNull | data_name ) |
Return whether fcurve targets the given collection path + data name.
For example, to match F-Curves for the pose bone named "botje", you'd pass collection_rna_path = "pose.bones[" and data_name="botje".
Definition at line 2614 of file animrig/intern/action.cc.
References blender::BLI_assert(), blender::BLI_str_quoted_substr(), blender::StringRefNull::c_str(), fcurve_matches_collection_path(), blender::blender::StringRefBase::is_empty(), and blender::blender::StringRefBase::size().
Referenced by blender::build_keylist_for_target(), blender::seq::fcurve_matches(), fcurve_matches_collection_path(), and blender::update_duplicate_action_constraint_settings().
|
static |
Definition at line 1964 of file animrig/intern/action.cc.
References blender::BKE_fcurve_free(), and fcurve_ptr_destructor().
Referenced by fcurve_ptr_destructor(), and blender::animrig::Channelbag::fcurves_clear().
|
static |
Definition at line 1988 of file animrig/intern/action.cc.
References fcurve_ptr_noop_destructor().
Referenced by blender::animrig::Channelbag::fcurve_detach_by_index(), and fcurve_ptr_noop_destructor().
| Span< FCurve * > blender::animrig::fcurves_for_action_slot | ( | Action & | action, |
| slot_handle_t | slot_handle ) |
Return the F-Curves for this specific slot handle.
This is just a utility function, that's intended to become obsolete when multi-layer Actions are introduced. However, since Blender currently only supports a single layer with a single strip, of a single type, this function can be used.
The use of this function is also an indicator for code that will have to be altered when multi-layered Actions are getting implemented.
Definition at line 2544 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), channelbag_for_action_slot(), blender::animrig::Channelbag::fcurves(), and fcurves_for_action_slot().
Referenced by blender::action_layered_keyframes_loop(), blender::action_to_keylist(), blender::adt_apply_all_fcurves_cb(), blender::animchannels_clean_empty_exec(), blender::animdata_filter_shapekey(), blender::animsys_evaluate_action(), blender::bke::BKE_action_find_fcurves_with_bones(), blender::BKE_action_fix_paths_rename(), blender::BKE_action_flip_with_pose(), blend_in_action(), delete_keyframe(), fcurves_for_action_slot(), fcurves_for_action_slot(), blender::animrig::legacy::fcurves_for_action_slot_templated(), fcurves_for_assigned_action(), fcurves_for_assigned_action(), blender::animrig::Action::get_frame_range_of_slot(), blender::animrig::Action::has_keyframes(), blender::animrig::Action::is_slot_animated(), blender::nla_eval_domain_action(), blender::nlaedit_apply_scale_exec(), blender::nlasnapshot_from_action(), blender::nlastrips_apply_all_curves_cb(), blender::rename_paths_action(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| Span< const FCurve * > blender::animrig::fcurves_for_action_slot | ( | const Action & | action, |
| slot_handle_t | slot_handle ) |
Definition at line 2554 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), channelbag_for_action_slot(), blender::animrig::Channelbag::fcurves(), and fcurves_for_action_slot().
Return the F-Curves for the assigned Action Slot.
If adt is nullptr or there is no Action assigned (i.e. adt->action == nullptr), an empty Vector is returned.
Definition at line 349 of file animdata.cc.
References blender::AnimData::action, fcurves_for_action_slot(), fcurves_for_assigned_action(), and blender::AnimData::slot_handle.
Referenced by blender::animviz_motionpath_compute_range(), assigned_action_has_keyframe_at(), blender::build_keylist_for_target(), blender::ED_curve_updateAnimPaths(), fcurves_for_assigned_action(), fcurves_for_assigned_action(), blender::gather_frames_to_render_for_adt(), blender::ed::greasepencil::get_selected_object_keyframes(), blender::ed::vse::has_playback_animation(), blender::modifiers_has_animation_check(), and blender::ed::vse::sequencer_paste_animation().
Definition at line 357 of file animdata.cc.
References blender::AnimData::action, fcurves_for_action_slot(), fcurves_for_assigned_action(), and blender::AnimData::slot_handle.
| Vector< FCurve * > blender::animrig::fcurves_in_action_slot_filtered | ( | bAction * | act, |
| slot_handle_t | slot_handle, | ||
| FunctionRef< bool(const FCurve &fcurve)> | predicate ) |
Return the F-Curves in the given action+slot for which predicate returns true.
Definition at line 2640 of file animrig/intern/action.cc.
References blender::BLI_assert(), fcurves_in_action_slot_filtered(), and foreach_fcurve_in_action_slot().
Referenced by fcurves_in_action_slot_filtered(), blender::seq::free_animdata(), blender::seq::offset_animdata(), and blender::ed::vse::sequencer_copy_animation_to_vector().
| Vector< FCurve * > blender::animrig::fcurves_in_listbase_filtered | ( | ListBaseT< FCurve > | fcurves, |
| FunctionRef< bool(const FCurve &fcurve)> | predicate ) |
Return the F-Curves in the given listbase for which predicate returns true.
Definition at line 2671 of file animrig/intern/action.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and fcurves_in_listbase_filtered().
Referenced by fcurves_in_listbase_filtered(), blender::ed::vse::sequencer_copy_animation_listbase(), and blender::seq::strip_drivers_duplicate().
| Vector< FCurve * > blender::animrig::fcurves_in_span_filtered | ( | Span< FCurve * > | fcurves, |
| FunctionRef< bool(const FCurve &fcurve)> | predicate ) |
Return the F-Curves in the given span for which predicate returns true.
Definition at line 2657 of file animrig/intern/action.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and fcurves_in_span_filtered().
Referenced by fcurves_in_span_filtered(), and blender::seq::strip_animation_duplicate().
Definition at line 179 of file animdata.cc.
References blender::BKE_id_is_editable(), find_related_action(), find_related_ids(), get_action(), and blender::bAction::id.
Referenced by find_related_action(), and id_action_ensure().
Build a Vector of IDs that are related to the given ID. Related things are e.g. Object<->Data, Mesh<->Material and so on. The exact relationships are defined per ID type. Only relationships of 1:1 are traced. The case of multiple users for 1 ID is treated as not related. The returned Vector always contains the passed ID as the first index as such will never be empty.
Definition at line 62 of file animdata.cc.
References add_object_data_users(), blender::BKE_id_owner_get(), blender::BKE_key_from_id(), blender::BLI_assert(), blender::data, blender::Object::data, find_related_ids(), blender::ID::flag, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, blender::Key::from, blender::GS(), blender::bNodeTree::id, blender::Key::id, blender::Object::id, blender::ParticleSettings::id, blender::ID_FLAG_EMBEDDED_DATA, blender::ID_KE, blender::ID_MA, blender::ID_OB, blender::ID_PA, ID_REAL_USERS, blender::ID::name, blender::bke::node_tree_from_id(), blender::Main::objects, blender::ParticleSystem::part, and blender::Object::particlesystem.
Referenced by find_related_action(), find_related_ids(), and blender::merge_actions_selection_exec().
| slot_handle_t blender::animrig::first_slot_handle | ( | const bAction & | dna_action | ) |
Return the handle of the first slot of this Action.
This is for code that needs to treat Actions as somewhat-legacy Actions, i.e. as holders of F-Curves for which the specific slot is not interesting.
TODO: Maybe at some point this function should get extended with an ID type parameter, to return the first slot that is suitable for that ID type.
Definition at line 2952 of file animrig/intern/action.cc.
References first_slot_handle(), blender::ActionSlot::handle, blender::bAction::slot_array, blender::bAction::slot_array_num, and blender::animrig::Slot::unassigned.
Referenced by first_slot_handle().
| bool blender::animrig::foreach_action_slot_use | ( | const ID & | animated_id, |
| FunctionRef< bool(Action &action, slot_handle_t slot_handle)> | callback ) |
Call the given callback for each Action + Slot that this ID uses.
The following cases are visited:
| callback | The function to call for each Action+Slot used. Even when there is no slot assigned, this function will be called (but then with slot_handle = Slot::unassigned). The callback should return true to continue the foreach loop, or return false to stop it. |
Definition at line 94 of file action_iterators.cc.
References foreach_action_slot_use(), and foreach_action_slot_use_with_references().
Referenced by blender::convert_to_rotation_mode(), foreach_action_slot_use(), is_id_using_action_slot(), blender::animrig::internal::rebuild_slot_user_cache(), and blender::rotation_mode_convert_exec().
| bool blender::animrig::foreach_action_slot_use_with_references | ( | ID & | animated_id, |
| FunctionRef< bool(ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *last_slot_identifier)> | callback ) |
Essentially the same as foreach_action_slot_use(), except that it provides the ID as well as pointers via which the callback can modify which Action/slot is assigned.
The ID passed to the callback is always the same animated_id as is passed to this function. The actions & slots passed to the callback are not necessarily the direct action & slot of that ID: they can also be the action & slot of an Action Constraint or NLA Strip owned by the ID.
Visit a constraint, and call the callback if it's an Action constraint.
Definition at line 112 of file action_iterators.cc.
References blender::bActionConstraint::act, blender::NlaStrip::act, blender::AnimData::action, blender::bActionConstraint::action_slot_handle, blender::NlaStrip::action_slot_handle, blender::BKE_animdata_from_id(), blender::BKE_pose_ensure(), blender::CONSTRAINT_TYPE_ACTION, constraints, blender::data, blender::DEG_is_original(), foreach_action_slot_use_with_references(), blender::bke::nla::foreach_strip_adt(), blender::GS(), blender::ID_OB, blender::AnimData::last_slot_identifier, blender::bActionConstraint::last_slot_identifier, blender::NlaStrip::last_slot_identifier, blender::ID::name, blender::OB_ARMATURE, and blender::AnimData::slot_handle.
Referenced by foreach_action_slot_use(), foreach_action_slot_use_with_references(), move_slot(), blender::animrig::versioning::tag_action_users_for_slotted_actions_conversion(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::foreach_action_slot_use_with_rna | ( | ID & | animated_id, |
| FunctionRef< bool(ID &animated_id, bAction *action, PointerRNA &action_slot_owner_ptr, PropertyRNA &action_slot_prop, char *last_slot_identifier)> | callback ) |
Essentially the same as foreach_action_slot_use(), except that it provides the ID as well as the RNA properties via which the callback can modify which Action/slot is assigned.
The ID passed to the callback is always the same animated_id as is passed to this function. The actions & slots passed to the callback are not necessarily the direct action & slot of that ID: they can also be the action & slot of an Action Constraint or NLA Strip owned by the ID.
References foreach_action_slot_use_with_rna().
Referenced by blender::animrig::versioning::convert_legacy_action_assignments(), foreach_action_slot_use_with_rna(), foreach_action_slot_use_with_rna(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::foreach_action_slot_use_with_rna | ( | ID & | animated_id, |
| FunctionRef< bool(ID &animated_id, bAction *action, PointerRNA &action_slot_ptr, PropertyRNA &action_slot_prop, char *last_slot_identifier)> | callback ) |
Visit a constraint, and call the callback if it's an Action constraint.
Definition at line 196 of file action_iterators.cc.
References blender::bActionConstraint::act, blender::NlaStrip::act, blender::AnimData::action, blender::BKE_animdata_from_id(), blender::BKE_pose_ensure(), blender::CONSTRAINT_TYPE_ACTION, constraints, blender::data, blender::DEG_is_original(), foreach_action_slot_use_with_rna(), blender::bke::nla::foreach_strip_adt(), blender::GS(), blender::ID_OB, blender::AnimData::last_slot_identifier, blender::bActionConstraint::last_slot_identifier, blender::NlaStrip::last_slot_identifier, blender::ID::name, blender::OB_ARMATURE, blender::RNA_pointer_create_discrete(), and blender::RNA_struct_find_property().
| void blender::animrig::foreach_fcurve_in_action | ( | Action & | action, |
| FunctionRef< void(FCurve &fcurve)> | callback ) |
Iterates over all FCurves of the Action and executes the callback on it. Works on layered and legacy actions.
Definition at line 29 of file action_iterators.cc.
References blender::animrig::StripKeyframeData::channelbags(), foreach_fcurve_in_action(), blender::animrig::Strip::Keyframe, layer, and blender::animrig::Action::layers().
Referenced by blender::blo_do_versions_404(), blender::do_versions_after_linking_404(), and foreach_fcurve_in_action().
| void blender::animrig::foreach_fcurve_in_action_slot | ( | Action & | action, |
| slot_handle_t | handle, | ||
| FunctionRef< void(FCurve &fcurve)> | callback ) |
Iterates over all FCurves of the given slot handle in the Action and executes the callback on it. This includes data that may be locked. If you want to limit this to editable data only use foreach_fcurve_in_action_slot_editable.
Definition at line 72 of file action_iterators.cc.
References blender::BLI_assert(), blender::animrig::StripKeyframeData::channelbags(), foreach_fcurve_in_action_slot(), blender::animrig::Strip::Keyframe, layer, and blender::animrig::Action::layers().
Referenced by blender::action_copy_fcurves_by_basepath(), blender::do_versions_after_linking_405(), blender::ed::animrig::extract_pose(), fcurves_in_action_slot_filtered(), foreach_fcurve_in_action_slot(), blender::get_item_transform_flags_and_fcurves(), blender::nodes::refresh_node_sockets_animation_inout(), blender::animrig::tests::TEST_F(), and blender::ed::animrig::update_pose_action_from_scene().
| void blender::animrig::foreach_fcurve_in_action_slot_editable | ( | Action & | action, |
| slot_handle_t | handle, | ||
| FunctionRef< void(FCurve &fcurve)> | callback ) |
Like foreach_fcurve_in_action_slot except any data that is not editable is skipped.
Definition at line 45 of file action_iterators.cc.
References assert_baklava_phase_1_invariants(), blender::BLI_assert(), blender::animrig::StripKeyframeData::channelbags(), blender::FCURVE_PROTECTED, foreach_fcurve_in_action_slot_editable(), blender::animrig::Strip::Keyframe, layer, and blender::animrig::Action::layers().
Referenced by blender::clear_anim_v3d_exec(), blender::clear_anim_vse_exec(), clear_keyframe(), blender::delete_key_v3d_without_keying_set(), blender::delete_key_vse_without_keying_set(), and foreach_fcurve_in_action_slot_editable().
| void blender::animrig::generate_single_keying_result_report | ( | const SingleKeyingResult | result, |
| ReportList * | reports ) |
Add a message into the ReportList depending on which SingleKeyingResult is passed. This should only be used when a single keyframe is being added per user action. Otherwise use CombinedKeyingResult to avoid spamming the user with messages.
Definition at line 50 of file animrig/intern/keyframing.cc.
References _KEYING_RESULT_MAX, blender::BKE_reportf(), CANNOT_CREATE_FCURVE, CANNOT_RESOLVE_PATH, FCURVE_NOT_KEYFRAMEABLE, generate_single_keying_result_report(), ID_NOT_ANIMATABLE, ID_NOT_EDITABLE, NO_KEY_NEEDED, NO_VALID_LAYER, NO_VALID_SLOT, NO_VALID_STRIP, blender::result, blender::RPT_ERROR, blender::RPT_INFO, SUCCESS, UNABLE_TO_INSERT_TO_NLA_STACK, and UNKNOWN_FAILURE.
Referenced by blender::achannel_setting_slider_nla_curve_cb(), autokeyframe_property(), generate_single_keying_result_report(), blender::insert_key_button_exec(), and blender::pyrna_struct_keyframe_insert().
|
nodiscard |
Generic function to build Action-assignment logic.
This is a low-level function, intended as a building block for higher-level Action assignment functions.
The function is named "generic" as it is independent of whether this is for direct assignment to the ID, or to an NLA strip, or an Action Constraint.
Definition at line 1276 of file animrig/intern/action.cc.
References blender::BLI_assert(), generic_assign_action(), generic_assign_action_slot(), generic_slot_for_autoassign(), blender::bAction::id, blender::id_us_min(), blender::id_us_plus(), OK, blender::result, blender::animrig::Slot::unassigned, and UNUSED_VARS_NDEBUG.
Referenced by assign_action(), blender::animrig::nla::assign_action(), assign_tmpaction(), blender::BKE_nla_tweakmode_exit(), generic_assign_action(), move_slot(), blender::animrig::tests::TEST_F(), and blender::animrig::nla::unassign_action().
|
nodiscard |
Generic function to build Slot-assignment logic.
This is a low-level function, intended as a building block for higher-level slot assignment functions.
The function is named "generic" as it is independent of whether this is for direct assignment to the ID, or to an NLA strip, or an Action Constraint.
Definition at line 1409 of file animrig/intern/action.cc.
References blender::BLI_assert(), blender::BLI_strncpy_utf8(), generic_assign_action_slot(), blender::ActionSlot::handle, blender::ActionSlot::identifier, blender::animrig::Slot::identifier_length_max, is_id_using_action_slot(), blender::animrig::Slot::is_suitable_for(), MissingAction, OK, blender::animrig::Action::slot_for_handle(), blender::animrig::Action::slot_setup_for_id(), SlotNotFromAction, SlotNotSuitable, blender::animrig::Action::slots(), blender::animrig::Slot::unassigned, blender::animrig::Slot::users_add(), and blender::animrig::Slot::users_remove().
Referenced by assign_action_slot(), blender::animrig::nla::assign_action_slot(), generic_assign_action(), generic_assign_action_slot(), generic_assign_action_slot_handle(), move_slot(), and blender::animrig::tests::TEST_F().
|
nodiscard |
Generic function to build Slot Handle-assignment logic.
This is a low-level function, intended as a building block for higher-level slot handle assignment functions.
The function is named "generic" as it is independent of whether this is for direct assignment to the ID, or to an NLA strip, or an Action Constraint.
Definition at line 1466 of file animrig/intern/action.cc.
References generic_assign_action_slot(), generic_assign_action_slot_handle(), MissingAction, OK, and blender::animrig::Slot::unassigned.
Referenced by assign_tmpaction_and_slot_handle(), and generic_assign_action_slot_handle().
|
nodiscard |
Generic function for finding the slot to auto-assign when the Action is assigned.
This is a low-level function, used by generic_assign_action() to pick a slot. It's declared here so that unit tests can reach it.
The function is named "generic" as it is independent of whether this is for direct assignment to the ID, or to an NLA strip, or an Action Constraint.
Definition at line 1318 of file animrig/intern/action.cc.
References generic_slot_for_autoassign(), blender::animrig::Slot::has_idtype(), blender::blender::StringRefBase::is_empty(), blender::animrig::Slot::is_suitable_for(), blender::ID::name, blender::animrig::Action::slot(), blender::animrig::Action::slot_find_by_identifier(), blender::animrig::Action::slots(), blender::StringRef::StringRef(), and blender::blender::StringRefBase::substr().
Referenced by assign_action_ensure_slot_for_keying(), blender::BKE_action_flip_with_pose(), blender::animrig::versioning::convert_legacy_action_assignments(), generic_assign_action(), generic_slot_for_autoassign(), get_best_pose_slot_for_id(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
Return the Action of this ID, or nullptr if it has none.
Definition at line 1526 of file animrig/intern/action.cc.
References blender::AnimData::action, blender::BKE_animdata_from_id(), and get_action().
Referenced by action_channelbag_ensure(), blender::io::usd::USDArmatureWriter::do_write(), find_related_action(), get_action(), blender::merge_actions_selection_exec(), blender::merge_actions_selection_poll(), prep_action_layer_for_keying(), blender::separate_slots_exec(), and blender::separate_slots_poll().
| std::optional< std::pair< Action *, Slot * > > blender::animrig::get_action_slot_pair | ( | ID & | animated_id | ) |
Get the Action and the Slot that animate this ID.
Definition at line 1538 of file animrig/intern/action.cc.
References blender::AnimData::action, blender::BKE_animdata_from_id(), get_action_slot_pair(), blender::animrig::Action::slot_for_handle(), and blender::AnimData::slot_handle.
Referenced by get_action_slot_pair(), blender::nodes::refresh_node_sockets_animation_inout(), blender::remove_sequencer_fcurves(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
static |
Definition at line 28 of file keyframing_auto.cc.
References blender::AUTOKEY_FLAG_INSERTAVAILABLE, blender::AUTOKEY_FLAG_INSERTNEEDED, blender::AUTOKEY_MODE_EDITKEYS, get_autokey_flags(), blender::INSERTKEY_AVAILABLE, blender::INSERTKEY_CYCLE_AWARE, blender::INSERTKEY_MATRIX, blender::INSERTKEY_NEEDED, blender::INSERTKEY_NOFLAGS, blender::INSERTKEY_REPLACE, is_autokey_mode(), is_keying_flag(), blender::KEYING_FLAG_CYCLEAWARE, and blender::KEYING_FLAG_VISUALKEY.
Referenced by autokeyframe_object(), autokeyframe_pose_channel(), autokeyframe_property(), and get_autokey_flags().
Get the best slot to read pose data from for the given ID. Will always return a Slot as it falls back to the first Slot.
Assumes that the Action has at least one Slot.
Definition at line 471 of file pose.cc.
References BLI_assert_msg, generic_slot_for_autoassign(), get_best_pose_slot_for_id(), blender::animrig::Action::slot(), and blender::bAction::slot_array_num.
Referenced by blender::action_preview_render_prepare(), any_bone_selected(), get_best_pose_slot_for_id(), pose_apply_action(), blender::pose_backup_create(), blender::poselib_keytag_pose(), blender::animrig::tests::TEST_F(), and blender::ed::animrig::update_pose_action_from_scene().
|
static |
LERP between current value (blend_factor=0.0) and the value from the FCurve (blend_factor=1.0).
Definition at line 110 of file pose.cc.
References blender::BKE_animsys_read_from_rna_path(), blender::calculate_fcurve(), get_fcurve_blend_value(), blender::PathResolvedRNA::prop, blender::PROP_BOOLEAN, blender::PROP_ENUM, blender::PROP_INT, blender::RNA_property_type(), and roundf.
Referenced by animsys_blend_in_fcurves(), blend_rotation(), and get_fcurve_blend_value().
|
static |
Return the frame range of the span of keys.
Definition at line 805 of file animrig/intern/action.cc.
References blender::FMod_Cycles::after_mode, blender::FMod_Cycles::before_mode, blender::BKE_fcurve_calc_range(), blender::FModifier::data, blender::FCM_EXTRAPOLATE_NONE, blender::FCM_LIMIT_XMAX, blender::FCM_LIMIT_XMIN, blender::FMod_Limits::flag, blender::FMODIFIER_TYPE_CYCLES, blender::FMODIFIER_TYPE_LIMITS, get_frame_range_of_fcurves(), max, blender::max_ff(), MAXFRAMEF, min, blender::min_ff(), MINAFRAMEF, blender::FMod_Limits::rect, blender::FModifier::type, blender::rctf::xmax, and blender::rctf::xmin.
Referenced by blender::animrig::Action::get_frame_range(), get_frame_range_of_fcurves(), blender::animrig::Action::get_frame_range_of_keys(), and blender::animrig::Action::get_frame_range_of_slot().
| Vector< RNAPath > blender::animrig::get_keyable_id_property_paths | ( | const PointerRNA & | ptr | ) |
Returns a Vector of ID properties on the given pointer that can be animated. Not all pointer types are supported. Unsupported pointer types will return an empty vector.
Definition at line 202 of file anim_rna.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BLI_str_escape(), blender::IDProperty::data, blender::PointerRNA::data, get_keyable_id_property_paths(), blender::IDPropertyData::group, blender::Object::id, is_idproperty_keyable(), MAX_IDPROP_NAME, blender::IDProperty::name, blender::bPoseChannel::prop, blender::ID::properties, blender::RNA_path_resolve_property(), blender::RNA_property_is_runtime(), and blender::PointerRNA::type.
Referenced by blender::ed::animrig::construct_pose_rna_paths(), blender::construct_rna_paths(), get_keyable_id_property_paths(), and blender::poselib_keytag_pose().
| KeyframeSettings blender::animrig::get_keyframe_settings | ( | bool | from_userprefs | ) |
Helper function to generate the KeyframeSettings struct.
| from_userprefs | if true read the user preferences for the settings, else return static defaults. |
Definition at line 24 of file animrig/intern/fcurve.cc.
References blender::BEZT_IPO_BEZ, blender::BEZT_KEYTYPE_KEYFRAME, get_keyframe_settings(), blender::animrig::KeyframeSettings::handle, blender::HD_AUTO_ANIM, blender::animrig::KeyframeSettings::interpolation, blender::animrig::KeyframeSettings::keyframe_type, and blender::U.
Referenced by blender::alloc_driver_fcurve(), bake_fcurve(), bake_fcurve_segments(), get_keyframe_settings(), blender::graphkeys_click_insert_exec(), blender::insert_graph_keys(), insert_keyframe_direct(), blender::animrig::nla::insert_keyframe_direct(), insert_keyframes(), blender::io::otio::insert_keyframes(), blender::insert_nla_curve_key(), blender::propagate_curve_values(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), and blender::bke::tests::TEST_F().
| eInsertKeyFlags blender::animrig::get_keyframing_flags | ( | Scene * | scene | ) |
Get the settings for key-framing from the given scene.
Definition at line 282 of file animrig/intern/keyframing.cc.
References get_keyframing_flags(), blender::INSERTKEY_CYCLE_AWARE, blender::INSERTKEY_MATRIX, blender::INSERTKEY_NEEDED, blender::INSERTKEY_NOFLAGS, is_keying_flag(), blender::KEYING_FLAG_CYCLEAWARE, blender::KEYING_FLAG_VISUALKEY, and blender::MANUALKEY_FLAG_INSERTNEEDED.
Referenced by blender::achannel_setting_slider_cb(), blender::achannel_setting_slider_nla_curve_cb(), blender::add_default_keyingset_exec(), blender::add_keyingset_button_exec(), apply_keyingset(), get_keyframing_flags(), blender::insert_action_keys(), blender::insert_graph_keys(), blender::insert_key(), and blender::insert_key_button_exec().
| KeyingSet * blender::animrig::get_keyingset_for_autokeying | ( | const Scene * | scene, |
| const char * | transformKSName ) |
Get Keying Set to use for Auto-Key-Framing some transforms.
Definition at line 137 of file animrig/intern/keyingsets.cc.
References blender::Scene::active_keyingset, blender::AUTOKEY_FLAG_INSERTAVAILABLE, blender::AUTOKEY_FLAG_ONLYKEYINGSET, builtin_keyingset_get_named(), get_keyingset_for_autokeying(), is_keying_flag(), and scene_get_active_keyingset().
Referenced by get_keyingset_for_autokeying(), blender::ed::object::object_clear_transform_generic_exec(), blender::pose_clear_transform_generic_exec(), blender::pose_paste_exec(), blender::snap_sel_to_grid_exec(), and blender::snap_selected_to_location_rotation().
| std::string blender::animrig::get_pose_bone_rna_path | ( | const bPoseChannel & | pose_bone | ) |
Returns the full pose bone rna path. For example "pose.bones["bone_name"]".
Definition at line 85 of file anim_rna.cc.
References blender::BLI_str_escape(), get_pose_bone_rna_path(), blender::bPoseChannel::name, and pose_bone_path_prefix.
Referenced by get_pose_bone_rna_path().
| Vector< float > blender::animrig::get_property_values | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| bool | visual_key ) |
Return all values of the given PropertyRNA. In case the property is an array, the length of the vector is the same as the length of the array. Otherwise the vector has just 1 element. All property types are cast to float.
Definition at line 395 of file animrig/intern/keyframing.cc.
References get_property_values(), get_rna_values(), visualkey_can_use(), and visualkey_get_values().
Referenced by get_property_values(), insert_keyframe_direct(), blender::animrig::nla::insert_keyframe_direct(), insert_keyframes(), and blender::insert_nla_curve_key().
| Vector< float > blender::animrig::get_rna_values | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop ) |
Get the values of the given property. Casts non-float properties to float.
Definition at line 26 of file anim_rna.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), get_rna_values(), length(), blender::MEM_new_array_uninitialized(), blender::PROP_BOOLEAN, blender::PROP_ENUM, blender::PROP_FLOAT, blender::PROP_INT, blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::RNA_property_array_check(), blender::RNA_property_array_length(), blender::RNA_property_boolean_get(), blender::RNA_property_boolean_get_array(), blender::RNA_property_enum_get(), blender::RNA_property_float_get(), blender::RNA_property_float_get_array(), blender::RNA_property_int_get(), blender::RNA_property_int_get_array(), and blender::RNA_property_type().
Referenced by blender::ed::animrig::extract_pose(), blender::fcurve_is_changed(), blender::ed::animrig::generate_path_values(), get_property_values(), get_rna_values(), and visualkey_get_values().
| std::optional< eRotationModes > blender::animrig::get_rotation_mode_from_path | ( | ParsedRNAPathRef | rna_path | ) |
Given an RNA path to a rotation property, return the corresponding rotation mode.
Definition at line 121 of file anim_rna.cc.
References blender::blender::StringRefBase::endswith(), get_rotation_mode_from_path(), blender::ROT_MODE_AXISANGLE, blender::ROT_MODE_EUL, blender::ROT_MODE_QUAT, and blender::blender::StringRefBase::startswith().
Referenced by animsys_blend_in_fcurves(), get_rotation_mode_from_path(), is_rotation_path(), and blender::animrig::tests::TEST_F().
| std::optional< eRotationModes > blender::animrig::get_rotation_mode_from_rna_pointer | ( | const PointerRNA & | ptr | ) |
Given a PointerRNA return the rotation mode of the data it points to.
Definition at line 152 of file anim_rna.cc.
References blender::PointerRNA::data, get_rotation_mode_from_rna_pointer(), blender::bPoseChannel::rotmode, blender::Object::rotmode, and blender::PointerRNA::type.
Referenced by animsys_blend_in_fcurves(), blender::construct_rna_paths(), and get_rotation_mode_from_rna_pointer().
| StringRefNull blender::animrig::get_rotation_mode_path | ( | eRotationModes | rotation_mode | ) |
Get the rna path for the given rotation mode.
Definition at line 109 of file anim_rna.cc.
References get_rotation_mode_path(), blender::ROT_MODE_AXISANGLE, and blender::ROT_MODE_QUAT.
Referenced by blender::ed::transform::autokeyframe_object(), blender::ed::transform::autokeyframe_pose(), get_rotation_mode_path(), blender::poselib_keytag_pose(), blender::ed::AnimTransformable::rna_path_to_property(), blender::ed::AnimTransformable::rna_path_to_rotation(), and blender::slide_subjects_autokey().
|
static |
Definition at line 88 of file animrig/intern/action.cc.
References blender::BLI_assert(), grow_array(), blender::MEM_new_array_zeroed(), blender::num, T, and blender::uninitialized_relocate_n().
Referenced by blender::animrig::Channelbag::fcurve_create_many(), grow_array(), and grow_array_and_append().
|
static |
Definition at line 101 of file animrig/intern/action.cc.
References grow_array(), grow_array_and_append(), blender::num, and T.
Referenced by blender::animrig::Channelbag::channel_group_create(), blender::animrig::StripKeyframeData::channelbag_for_slot_add(), blender::animrig::Channelbag::fcurve_append(), grow_array_and_append(), blender::animrig::Action::layer_add(), move_slot(), blender::animrig::Action::slot_add(), blender::animrig::StripKeyframeData::slot_data_duplicate(), blender::animrig::Layer::strip_add(), and blender::animrig::Action::strip_keyframe_data_append().
|
static |
Definition at line 108 of file animrig/intern/action.cc.
References blender::BLI_assert(), grow_array_and_insert(), blender::MEM_new_array_zeroed(), blender::num, T, and blender::uninitialized_relocate_n().
Referenced by blender::animrig::Channelbag::fcurve_create(), and grow_array_and_insert().
Get (or add relevant data to be able to do so) the Active Action for the given Animation Data block, given an ID block where the Animation Data should reside.
Definition at line 195 of file animdata.cc.
References blender::AnimData::action, assign_action(), blender::BKE_action_add(), blender::BKE_animdata_ensure_id(), blender::BKE_id_owner_get(), blender::BLI_assert(), BLI_assert_msg, DATA_, blender::DEG_id_tag_update(), blender::DEG_relations_tag_update(), find_related_action(), blender::Key::from, blender::GS(), blender::bAction::id, id_action_ensure(), blender::ID_FLAG_EMBEDDED_DATA, blender::ID_KE, blender::ID_RECALC_ANIMATION_NO_FLUSH, blender::id_us_min(), blender::ID::name, blender::gpu::shader::metadata::printf, SNPRINTF_UTF8, UNUSED_VARS_NDEBUG, and blender::ID::us.
Referenced by blender::io::alembic::FCurveCreationHelper::ensure_action_data(), blender::ed::object::followpath_path_animate_exec(), id_action_ensure(), blender::io::usd::import_blendshapes(), insert_keyframes(), blender::io::otio::insert_keyframes(), blender::ed::object::parent_set_with_depsgraph(), blender::io::usd::USDCameraReader::read_object_data(), blender::ed::vse::sequencer_paste_animation(), and blender::ui::tests::CopyDriversToSelected::SetUp().
Checks whether a keyframe exists for the given ID-block one the given frame.
| frame | The frame on which to check for a keyframe. This uses a threshold so the float doesn't need to match exactly. |
Definition at line 365 of file animrig/intern/keyframing.cc.
References assigned_action_has_keyframe_at(), blender::BKE_animdata_from_id(), blender::GS(), id_frame_has_keyframe(), blender::ID_OB, and object_frame_has_keyframe().
Referenced by autokeyframe_cfra_can_key(), blender::draw_selected_name(), and id_frame_has_keyframe().
| void blender::animrig::initialize_bezt | ( | BezTriple * | beztr, |
| float2 | position, | ||
| const KeyframeSettings & | settings, | ||
| eFCurve_Flags | fcu_flags ) |
Initialize the given BezTriple with default values.
Definition at line 300 of file animrig/intern/fcurve.cc.
References blender::BezTriple::amplitude, blender::BezTriple::back, BEZKEYTYPE_LVALUE, blender::BEZT_FLAG_SELECT, blender::BEZT_IPO_BEZ, blender::BEZT_IPO_CONST, blender::BEZT_IPO_LIN, blender::BezTriple::f1, blender::BezTriple::f2, blender::BezTriple::f3, blender::FCURVE_DISCRETE_VALUES, blender::FCURVE_INT_VALUES, blender::BezTriple::h1, blender::BezTriple::h2, blender::animrig::KeyframeSettings::handle, initialize_bezt(), blender::animrig::KeyframeSettings::interpolation, blender::BezTriple::ipo, blender::animrig::KeyframeSettings::keyframe_type, blender::BezTriple::period, position, and blender::BezTriple::vec.
Referenced by bake_fcurve(), initialize_bezt(), and insert_vert_fcurve().
| int blender::animrig::insert_bezt_fcurve | ( | FCurve * | fcu, |
| const BezTriple * | bezt, | ||
| eInsertKeyFlags | flag ) |
Lesser Key-framing API call.
Use this when validation of necessary animation data isn't necessary as it already exists, and there is a BezTriple that can be directly copied into the array.
This function adds a given BezTriple to an F-Curve. It will allocate memory for the array if needed, and will insert the BezTriple into a suitable place in chronological order.
Definition at line 165 of file animrig/intern/fcurve.cc.
References blender::FCurve::bezt, blender::BKE_fcurve_bezt_binarysearch_index(), blender::BKE_fcurve_get_cycle_type(), ELEM, blender::FCU_CYCLE_PERFECT, blender::FCurve::fpt, insert_bezt_fcurve(), blender::INSERTKEY_CYCLE_AWARE, blender::INSERTKEY_OVERWRITE_FULL, blender::INSERTKEY_REPLACE, blender::MEM_new_array_zeroed(), blender::MEM_new_zeroed(), replace_bezt_keyframe_ypos(), blender::FCurve::totvert, and blender::BezTriple::vec.
Referenced by blender::clean_fcurve(), blender::copy_animedit_keys(), blender::decimate_fcurve(), insert_bezt_fcurve(), insert_vert_fcurve(), and blender::ed::animation::paste_animedit_keys_fcurve().
|
static |
Definition at line 632 of file animrig/intern/keyframing.cc.
References blender::animrig::KeyInsertData::array_index, assert_baklava_phase_1_invariants(), blender::BLI_assert(), blender::animrig::Strip::data(), blender::animrig::Action::get_frame_range(), insert_key_layer(), blender::INSERTKEY_CYCLE_AWARE, blender::animrig::Action::is_cyclic(), layer, blender::animrig::KeyInsertData::position, blender::RNA_property_subtype(), and blender::RNA_property_type().
Referenced by insert_key_layer(), and insert_key_layered_action().
|
static |
Definition at line 687 of file animrig/intern/keyframing.cc.
References blender::animrig::CombinedKeyingResult::add(), blender::BLI_assert(), insert_key_layer(), insert_key_layered_action(), layer, blender::result, and UNABLE_TO_INSERT_TO_NLA_STACK.
Referenced by insert_key_layered_action(), and insert_keyframes().
|
static |
Definition at line 292 of file animrig/intern/keyingsets.cc.
References blender::KS_Path::array_index, blender::BKE_animsys_eval_context_construct(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_reports(), blender::DEG_id_tag_update(), DELETE_KEY, delete_keyframe(), blender::KS_Path::flag, blender::animrig::CombinedKeyingResult::generate_reports(), blender::animrig::CombinedKeyingResult::get_count(), blender::KS_Path::group, blender::KS_Path::groupmode, blender::GS(), blender::KS_Path::id, blender::Object::id, blender::ID_OB, blender::ID_RECALC_ANIMATION_NO_FLUSH, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_TRANSFORM, INSERT, insert_key_to_keying_set_path(), insert_keyframes(), blender::ToolSettings::keyframe_type, blender::KS_Path::keyingflag, blender::KS_Path::keyingoverride, keyingset_apply_keying_flags(), blender::KSP_FLAG_WHOLE_ARRAY, blender::KSP_GROUP_KSNAME, blender::KSP_GROUP_NONE, blender::animrig::CombinedKeyingResult::merge(), NA_ADDED, blender::ID::name, blender::KeyingSet::name, NC_ANIMATION, ND_KEYFRAME, blender::result, blender::RNA_id_pointer_create(), blender::KS_Path::rna_path, blender::RNA_path_resolve_property(), blender::RNA_property_array_length(), SUCCESS, blender::Scene::toolsettings, and blender::WM_main_add_notifier().
Referenced by apply_keyingset(), and insert_key_to_keying_set_path().
| SingleKeyingResult blender::animrig::insert_keyframe_direct | ( | PointerRNA & | ptr, |
| PropertyRNA & | prop, | ||
| FCurve & | fcu, | ||
| float | fcurve_frame, | ||
| eBezTriple_KeyframeType | keytype, | ||
| eInsertKeyFlags | flag ) |
Secondary Insert Key-framing API call.
Retrieves the value of the PropertyRNA and sets a key at fcurve_frame. If the property is an array, the FCurve's array_index is used to find the element's value.
| fcurve_frame | The frame at which to insert the keyframe. No time remapping is done on the frame. |
| keytype | The "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet. |
| flag | Used for special settings that alter the behavior of the keyframe insertion. These include the 'visual' key-framing modes, quick refresh, and extra keyframe filtering. |
Definition at line 431 of file animrig/intern/keyframing.cc.
References blender::FCurve::array_index, blender::BKE_fcurve_is_keyframable(), BLI_assert_unreachable, FCURVE_NOT_KEYFRAMEABLE, get_keyframe_settings(), get_property_values(), insert_keyframe_direct(), insert_vert_fcurve(), blender::INSERTKEY_MATRIX, blender::INSERTKEY_NO_USERPREF, blender::animrig::KeyframeSettings::keyframe_type, blender::RNA_property_type(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), UNKNOWN_FAILURE, and update_autoflags_fcurve_direct().
Referenced by blender::achannel_setting_slider_nla_curve_cb(), autokeyframe_property(), blender::insert_key_button_exec(), insert_keyframe_direct(), and blender::pyrna_struct_keyframe_insert().
| CombinedKeyingResult blender::animrig::insert_keyframes | ( | Main * | bmain, |
| PointerRNA * | struct_pointer, | ||
| std::optional< StringRefNull > | channel_group, | ||
| const Span< RNAPath > | rna_paths, | ||
| std::optional< float > | scene_frame, | ||
| const AnimationEvalContext & | anim_eval_context, | ||
| eBezTriple_KeyframeType | key_type, | ||
| eInsertKeyFlags | insert_key_flags ) |
Main key-frame insertion API.
Insert keys for struct_pointer, for all paths in rna_paths. Any necessary animation data (AnimData, Action, ...) is created if it doesn't already exist.
Note that this function was created as part of an ongoing refactor by merging two other functions that were almost identical to each other. There are still things left over from that which can and should be improved (such as the partially redundant scene_frame and anim_eval_contextparameters). Additionally, it's a bit of a mega-function now, and can probably be stripped down to a clearer core functionality.
| struct_pointer | RNA pointer to the struct to be keyed. This is often an ID, but not necessarily. For example, pose bones are also common. Note that if you have an ID and want to pass it here for keying, you can create the PointerRNA for it with RNA_id_pointer_create(). |
| channel_group | the channel group to put any newly created fcurves under. If not given, the standard groups are used. |
| rna_paths | the RNA paths to key. These paths are relative to struct_pointer. Note that for paths to array properties, if the array index is specified then only that element is keyed, but if the index is not specified then all array elements are keyed. |
| scene_frame | the frame to insert the keys at. This is in scene time, not NLA mapped (NLA mapping is already handled internally by this function). If not given, the evaluation time from anim_eval_context is used instead. |
Definition at line 729 of file animrig/intern/keyframing.cc.
References blender::AnimData::action, blender::animrig::CombinedKeyingResult::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::FCurve::bezt, blender::BKE_animdata_ensure_id(), blender::BKE_animsys_free_nla_keyframing_context_cache(), blender::BKE_animsys_nla_remap_keyframe_values(), blender::BKE_fcurve_bezt_binarysearch_index(), blender::BKE_id_is_editable(), blender::BLI_assert(), CANNOT_CREATE_FCURVE, CANNOT_RESOLVE_PATH, blender::PointerRNA::data, default_channel_group_for_path(), blender::DEG_id_tag_update(), ELEM, blender::AnimationEvalContext::eval_time, fcurve_find_in_action(), blender::animrig::CombinedKeyingResult::get_count(), get_keyframe_settings(), get_property_values(), blender::bAction::id, id_action_ensure(), ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_NOT_ANIMATABLE, ID_NOT_EDITABLE, blender::ID_RECALC_ANIMATION_NO_FLUSH, insert_key_layered_action(), insert_keyframes(), blender::INSERTKEY_AVAILABLE, blender::INSERTKEY_MATRIX, blender::INSERTKEY_NO_USERPREF, blender::INSERTKEY_REPLACE, blender::animrig::KeyframeSettings::keyframe_type, layer, blender::animrig::CombinedKeyingResult::merge(), nla_time_remap(), blender::PointerRNA::owner_id, prep_action_layer_for_keying(), blender::result, blender::RNA_id_pointer_create(), blender::RNA_path_from_ID_to_property(), blender::RNA_path_resolve_property(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SUCCESS, and blender::FCurve::totvert.
Referenced by blender::achannel_setting_slider_shapekey_cb(), autokeyframe_object(), autokeyframe_pose_channel(), autokeyframe_property(), blender::insert_fcurve_key(), blender::insert_graph_keys(), blender::insert_key(), blender::insert_key_button_exec(), insert_key_to_keying_set_path(), insert_keyframes(), blender::pyrna_struct_keyframe_insert(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| SingleKeyingResult blender::animrig::insert_vert_fcurve | ( | FCurve * | fcu, |
| const float2 | position, | ||
| const KeyframeSettings & | settings, | ||
| eInsertKeyFlags | flag ) |
Main Key-framing API call.
Use this when validation of necessary animation data isn't necessary as it already exists. It will insert a keyframe using the current value being keyframed.
This function is a wrapper for insert_bezt_fcurve(), and should be used when adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet.
| flag | Optional flags (eInsertKeyFlags) for controlling how keys get added and/or whether updates get done. |
Definition at line 429 of file animrig/intern/fcurve.cc.
References blender::FCurve::bezt, blender::BKE_fcurve_active_keyframe_set(), blender::BKE_fcurve_get_cycle_type(), blender::BKE_fcurve_handles_recalc(), blender::BLI_assert(), blender::FCU_CYCLE_PERFECT, blender::FCurve::flag, initialize_bezt(), insert_bezt_fcurve(), insert_vert_fcurve(), blender::INSERTKEY_CYCLE_AWARE, blender::INSERTKEY_FAST, blender::INSERTKEY_NEEDED, blender::INSERTKEY_OVERWRITE_FULL, blender::INSERTKEY_REPLACE, blender::BezTriple::ipo, new_key_needed(), NO_KEY_NEEDED, position, remap_cyclic_keyframe_location(), subdivide_nonauto_handles(), SUCCESS, blender::FCurve::totvert, and UNKNOWN_FAILURE.
Referenced by blender::alloc_driver_fcurve(), bake_fcurve_segments(), blender::convert_rotation_mode_range(), blender::graphkeys_click_insert_exec(), blender::insert_graph_keys(), insert_keyframe_direct(), blender::animrig::nla::insert_keyframe_direct(), blender::io::otio::insert_keyframes(), blender::insert_nla_curve_key(), insert_vert_fcurve(), blender::animrig::StripKeyframeData::keyframe_insert(), blender::propagate_curve_values(), blender::ed::animrig::replace_pose_key(), blender::ui::tests::CopyDriversToSelected::SetUp(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::editor::animation::tests::TEST_F(), and blender::editor::animation::tests::TEST_F().
| bool blender::animrig::is_autokey_mode | ( | const Scene * | scene, |
| eAutokey_Mode | mode ) |
Check the mode for auto-keyframing (per scene takes precedence).
Definition at line 68 of file keyframing_auto.cc.
References blender::ToolSettings::autokey_mode, is_autokey_mode(), blender::Scene::toolsettings, and blender::U.
Referenced by autokeyframe_cfra_can_key(), get_autokey_flags(), and is_autokey_mode().
| bool blender::animrig::is_autokey_on | ( | const Scene * | scene | ) |
Check if auto-key-framing is enabled (per scene takes precedence).
Definition at line 60 of file keyframing_auto.cc.
References blender::ToolSettings::autokey_mode, blender::AUTOKEY_ON, is_autokey_on(), blender::Scene::toolsettings, and blender::U.
Referenced by autokeyframe_cfra_can_key(), autokeyframe_property(), blender::ed::transform::greasepencil::createTransGreasePencilVerts(), blender::ed::greasepencil::ensure_active_keyframe(), blender::ed::sculpt_paint::ensure_editable_drawings(), blender::ed::transform::image_transform_set(), is_autokey_on(), blender::mask_normals_make_consistent_exec(), blender::mask_switch_direction_exec(), blender::ed::object::object_clear_transform_generic_exec(), blender::ed::transform::recalcData_objects(), blender::ed::transform::recalcData_pose(), blender::ed::vse::sequencer_strip_transform_clear_exec(), blender::slide_point_modal(), blender::slide_spline_curvature_modal(), blender::snap_sel_to_grid_exec(), blender::snap_selected_to_location_rotation(), blender::ed::transform::special_aftertrans_update__mask(), blender::ed::transform::special_aftertrans_update__object(), blender::ed::transform::special_aftertrans_update__pose(), blender::ed::transform::special_aftertrans_update__sequencer_image(), blender::ed::transform::viewRedrawForce(), and blender::ed::transform::viewRedrawPost().
|
static |
Definition at line 93 of file pose.cc.
References blender::AGRP_MUTED, blender::BKE_fcurve_is_empty(), blender::FCURVE_DISABLED, blender::FCURVE_MUTED, blender::bActionGroup::flag, blender::FCurve::flag, blender::FCurve::grp, and is_fcurve_evaluatable().
|
static |
Definition at line 99 of file evaluation.cc.
References blender::BKE_fcurve_is_empty(), blender::FCURVE_MUTED, blender::FCurve::flag, and is_fcurve_evaluatable().
Referenced by animsys_blend_in_fcurves(), evaluate_keyframe_data(), is_fcurve_evaluatable(), and is_fcurve_evaluatable().
|
static |
Definition at line 1263 of file animrig/intern/action.cc.
References foreach_action_slot_use(), and is_id_using_action_slot().
Referenced by generic_assign_action_slot(), and is_id_using_action_slot().
|
static |
Definition at line 170 of file anim_rna.cc.
References ELEM, blender::IDP_ARRAY, blender::IDP_BOOLEAN, blender::IDP_DOUBLE, blender::IDP_FLOAT, blender::IDP_INT, is_idproperty_keyable(), blender::RNA_property_anim_editable(), blender::IDProperty::subtype, and blender::IDProperty::type.
Referenced by get_keyable_id_property_paths(), and is_idproperty_keyable().
| bool blender::animrig::is_keying_flag | ( | const Scene * | scene, |
| eKeying_Flag | flag ) |
Check if a flag is set for keyframing (per scene takes precedence).
Definition at line 274 of file animrig/intern/keyframing.cc.
References is_keying_flag(), blender::ToolSettings::keying_flag, blender::Scene::toolsettings, and blender::U.
Referenced by blender::ed::transform::animrecord_check_state(), autokeyframe_object(), blender::ed::transform::autokeyframe_object(), blender::ed::transform::autokeyframe_pose(), autokeyframe_pose_channel(), blender::ed::transform::autokeyframe_sequencer_image(), blender::ui::depthdropper_depth_set(), get_autokey_flags(), get_keyframing_flags(), get_keyingset_for_autokeying(), is_keying_flag(), blender::ed::vse::sequencer_strip_transform_clear_exec(), and blender::nodes::inverse_eval::set_rna_property().
| bool blender::animrig::is_rotation_path | ( | ParsedRNAPathRef | rna_path | ) |
Given an RNA path, check if it is a path to a rotation property.
Definition at line 165 of file anim_rna.cc.
References get_rotation_mode_from_path(), and is_rotation_path().
Referenced by animsys_blend_in_fcurves(), blender::build_rotation_fcurve_map(), is_rotation_path(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::key_insertion_may_create_fcurve | ( | eInsertKeyFlags | insert_key_flags | ) |
Return whether key insertion functions are allowed to create new fcurves, according to the given flags.
Specifically, both INSERTKEY_REPLACE and INSERTKEY_AVAILABLE prohibit the creation of new F-Curves.
Definition at line 390 of file animrig/intern/keyframing.cc.
References blender::INSERTKEY_AVAILABLE, blender::INSERTKEY_REPLACE, and key_insertion_may_create_fcurve().
Referenced by key_insertion_may_create_fcurve(), and blender::animrig::StripKeyframeData::keyframe_insert().
|
static |
Definition at line 262 of file animrig/intern/keyingsets.cc.
References APPLY_KEYINGFLAG_OVERRIDE, blender::INSERTKEY_MATRIX, blender::INSERTKEY_NEEDED, keyingset_apply_keying_flags(), and blender::result.
Referenced by apply_keyingset(), insert_key_to_keying_set_path(), and keyingset_apply_keying_flags().
Check if the ID appears in the paths specified by the KeyingSet.
Definition at line 96 of file animrig/intern/keyingsets.cc.
References blender::BLI_findptr(), ELEM, keyingset_find_id(), offsetof, and blender::KeyingSet::paths.
Referenced by blender::insert_key_with_keyingset(), and keyingset_find_id().
| KeyingSetInfo * blender::animrig::keyingset_info_find_name | ( | const char | name[] | ) |
Find KeyingSet type info given a name.
Definition at line 105 of file animrig/intern/keyingsets.cc.
References blender::BLI_findstring(), keyingset_info_find_name(), blender::keyingset_type_infos, and offsetof.
Referenced by blender::ANIM_keyingset_context_ok_poll(), keyingset_info_find_name(), and validate_keyingset().
| void blender::animrig::keyingset_info_register | ( | KeyingSetInfo * | keyingset_info | ) |
Add the given KeyingSetInfo to the list of type infos, and create an appropriate builtin set too.
Definition at line 38 of file animrig/intern/keyingsets.cc.
References blender::BKE_keyingset_add(), blender::BLI_addtail(), blender::builtin_keyingsets, blender::KeyingSet::description, blender::KeyingSetInfo::description, blender::KeyingSetInfo::idname, blender::KeyingSetInfo::keyingflag, keyingset_info_register(), blender::keyingset_type_infos, blender::KeyingSetInfo::name, blender::STRNCPY(), and blender::KeyingSet::typeinfo.
Referenced by keyingset_info_register().
| void blender::animrig::keyingset_info_unregister | ( | Main * | bmain, |
| KeyingSetInfo * | keyingset_info ) |
Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate.
Definition at line 59 of file animrig/intern/keyingsets.cc.
References blender::BKE_keyingset_free_paths(), blender::BLI_freelinkN(), blender::BLI_remlink(), blender::BLI_remlink_safe(), blender::builtin_keyingsets, blender::KeyingSetInfo::idname, keyingset_info_unregister(), blender::keyingset_type_infos, blender::Scene::keyingsets, blender::Main::scenes, and STREQ.
Referenced by keyingset_info_unregister().
| void blender::animrig::keyingset_infos_exit | ( | ) |
Definition at line 82 of file animrig/intern/keyingsets.cc.
References blender::BKE_keyingsets_free(), blender::BLI_freelinkN(), blender::builtin_keyingsets, keyingset_infos_exit(), and blender::keyingset_type_infos.
Referenced by keyingset_infos_exit(), and blender::WM_exit_ex().
|
static |
Definition at line 270 of file animrig/intern/action.cc.
References layer, and layer_ptr_destructor().
Referenced by layer_ptr_destructor(), and blender::animrig::Action::layer_remove().
| void blender::animrig::move_slot | ( | Main & | bmain, |
| Slot & | slot, | ||
| Action & | from_action, | ||
| Action & | to_action ) |
Move the given slot from from_action to to_action. The slot identifier might not be exactly the same if the identifier already exists in the slots of to_action. Also the slot handle is likely going to be different on to_action. All users of the slot will be reassigned to the moved slot on to_action.
Definition at line 3003 of file animrig/intern/action.cc.
References assert_baklava_phase_1_invariants(), blender::BLI_assert(), BLI_assert_msg, blender::ActionStripKeyframeData::channelbag_array, blender::ActionStripKeyframeData::channelbag_array_num, blender::animrig::StripKeyframeData::channelbag_for_slot(), clone_slot(), blender::animrig::Strip::data(), blender::DEG_id_tag_update(), blender::animrig::StripKeyframeData::find_channelbag_index(), foreach_action_slot_use_with_references(), generic_assign_action(), generic_assign_action_slot(), grow_array_and_append(), blender::ActionSlot::handle, blender::ID_RECALC_ANIMATION, blender::animrig::Action::layer(), blender::animrig::Action::layer_keystrip_ensure(), blender::animrig::Action::layers(), move_slot(), OK, blender::result, shrink_array_and_remove(), blender::animrig::Action::slot_add(), slot_identifier_ensure_unique(), blender::animrig::Action::slot_remove(), blender::animrig::Action::slots(), blender::animrig::Layer::strip(), blender::animrig::Layer::strips(), UNUSED_VARS_NDEBUG, and blender::animrig::Slot::users().
Referenced by blender::merge_actions_selection_exec(), move_slot(), blender::separate_slots_exec(), blender::slot_channels_move_to_new_action_exec(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
static |
Return whether the given fcurve already evaluates to the same value as the proposed keyframe at the keyframe's time.
This is a helper function for determining whether to insert a keyframe or not when "only insert needed" is enabled.
NOTE: this does not determine whether inserting the keyframe would change the fcurve at points other than the keyframe itself. For example, even if inserting the key wouldn't change the fcurve's value at the time of the keyframe, the resulting changes to bezier interpolation could change the fcurve on either side of it. This function intentionally does not account for that, since that's not how the "only insert needed" feature is supposed to work.
Definition at line 362 of file animrig/intern/fcurve.cc.
References blender::FCurve::bezt, blender::BKE_fcurve_bezt_binarysearch_index(), blender::compare_ff_relative(), blender::evaluate_fcurve(), FLT_EPSILON, new_key_needed(), blender::FCurve::totvert, and blender::BezTriple::vec.
Referenced by insert_vert_fcurve(), and new_key_needed().
|
static |
Definition at line 411 of file animrig/intern/keyframing.cc.
References blender::AnimData::action, blender::BKE_animsys_get_nla_keyframing_context(), blender::BKE_nla_tweakedit_remap(), nla_time_remap(), and blender::NLATIME_CONVERT_UNMAP.
Referenced by insert_keyframes(), and nla_time_remap().
Definition at line 342 of file animrig/intern/keyframing.cc.
References blender::AnimData::action, blender::Object::adt, assigned_action_has_keyframe_at(), blender::BKE_nla_tweakedit_remap(), blender::NLATIME_CONVERT_UNMAP, and object_frame_has_keyframe().
Referenced by id_frame_has_keyframe(), and object_frame_has_keyframe().
| void blender::animrig::pose_apply_action | ( | const Span< Object * > | objects, |
| Action & | pose_action, | ||
| const AnimationEvalContext * | anim_eval_context, | ||
| const float | blend_factor ) |
Definition at line 449 of file pose.cc.
References any_bone_selected(), get_best_pose_slot_for_id(), blender::ActionSlot::handle, pose_apply_action(), pose_apply_action_blend(), and pose_apply_action_blend_all_bones().
| void blender::animrig::pose_apply_action | ( | Span< Object * > | objects, |
| Action & | pose_action, | ||
| const AnimationEvalContext * | anim_eval_context, | ||
| float | blend_factor ) |
Apply the given Action to all objects of the Span. The slot is chosen automatically, see get_best_pose_slot_for_id.
References pose_apply_action().
Referenced by pose_apply_action(), pose_apply_action(), blender::poselib_blend_apply(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| void blender::animrig::pose_apply_action_all_bones | ( | Object * | ob, |
| bAction * | action, | ||
| const int32_t | slot_handle, | ||
| const AnimationEvalContext * | anim_eval_context ) |
Definition at line 399 of file pose.cc.
References blender::animsys_evaluate_action(), blender::Object::id, pose_apply_action_all_bones(), and blender::RNA_id_pointer_create().
| void blender::animrig::pose_apply_action_all_bones | ( | Object * | ob, |
| bAction * | action, | ||
| slot_handle_t | slot_handle, | ||
| const AnimationEvalContext * | anim_eval_context ) |
Evaluate the action and apply it to the pose. Ignore selection state of the bones.
References pose_apply_action_all_bones().
Referenced by blender::action_preview_render_prepare(), pose_apply_action_all_bones(), pose_apply_action_all_bones(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| void blender::animrig::pose_apply_action_blend | ( | Object * | ob, |
| bAction * | action, | ||
| const int32_t | slot_handle, | ||
| const AnimationEvalContext * | anim_eval_context, | ||
| const float | blend_factor ) |
Definition at line 408 of file pose.cc.
References blend_in_action(), and pose_apply_action_blend().
| void blender::animrig::pose_apply_action_blend | ( | Object * | ob, |
| bAction * | action, | ||
| slot_handle_t | slot_handle, | ||
| const AnimationEvalContext * | anim_eval_context, | ||
| float | blend_factor ) |
Evaluate the action and blend the result into the current pose based on blend_factor. Only FCurves that relate to selected bones are evaluated.
References pose_apply_action_blend(), and pose_apply_action_blend_all_bones().
Referenced by pose_apply_action(), pose_apply_action_blend(), pose_apply_action_blend(), and blender::animrig::tests::TEST_F().
| void blender::animrig::pose_apply_action_blend_all_bones | ( | Object * | ob, |
| bAction * | action, | ||
| slot_handle_t | slot_handle, | ||
| const AnimationEvalContext * | anim_eval_context, | ||
| float | blend_factor ) |
Like pose_apply_action_blend but applies to all bones regardless of selection.
Definition at line 424 of file pose.cc.
References blend_in_action(), blender::Object::id, pose_apply_action_blend_all_bones(), and blender::RNA_id_pointer_create().
Referenced by pose_apply_action(), pose_apply_action_blend(), pose_apply_action_blend_all_bones(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::pose_bone_descendent_depth_iterator | ( | Object & | pose_ob, |
| bPoseChannel & | pchan, | ||
| FunctionRef< bool(bPoseChannel &child_bone)> | callback ) |
Iterates all descendents of the given pose bone depth first. The traversal for a branch is stopped if the callback returns false. Returns true if the iteration completed or false if it was stopped before visiting all bones.
Definition at line 67 of file animrig/intern/armature.cc.
References blender::BKE_pose_channels_hash_ensure(), blender::Object::pose, pose_bone_descendent_depth_iterator(), and pose_depth_iterator_recursive().
Referenced by pose_bone_descendent_depth_iterator(), and blender::selectconnected_posebonechildren().
| void blender::animrig::pose_bone_descendent_iterator | ( | Object & | pose_ob, |
| bPoseChannel & | pchan, | ||
| FunctionRef< void(bPoseChannel &child_bone)> | callback ) |
Iterates all descendents of the given pose bone including the bone itself. Iterates breadth first.
Definition at line 20 of file animrig/intern/armature.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_pose_channel_find_name(), blender::BKE_pose_channels_hash_ensure(), BLI_assert_unreachable, blender::Bone::childbase, blender::Bone::name, blender::Object::pose, pose_bone_descendent_iterator(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::ed::transform::bone_children_clear_transflag(), pose_bone_descendent_iterator(), blender::ed::transform::pose_channel_children_clear_transflag(), and blender::ed::outliner::restrictbutton_bone_visibility_fn().
| std::optional< std::string > blender::animrig::pose_bone_name_from_rna_path | ( | ParsedRNAPathRef | rna_path | ) |
Returns the name of the pose bone encoded in this rna path. If the given path is not to a pose bone, std::nullopt will be returned. This function does the unescaping of the string, which is why it has to return a copy of the string, and not just a StringRef.
Definition at line 92 of file anim_rna.cc.
References blender::rna_path::Member::identifier, blender::rna_path::LookupKey::key, MAXBONENAME, pose_bone_name_from_rna_path(), blender::UString::size(), and blender::UString::string().
Referenced by pose_bone_name_from_rna_path(), and blender::separate_armature_bones().
|
static |
Definition at line 47 of file animrig/intern/armature.cc.
References blender::BKE_pose_channel_find_name(), BLI_assert_unreachable, blender::bke::PChanBoneT< PoseChannelT, BoneT >::bone, blender::Bone::childbase, blender::bPoseChannel::name, blender::bke::PChanBoneT< PoseChannelT, BoneT >::pchan, blender::Object::pose, and pose_depth_iterator_recursive().
Referenced by pose_bone_descendent_depth_iterator(), and pose_depth_iterator_recursive().
|
static |
Definition at line 662 of file animrig/intern/keyframing.cc.
References assign_action_ensure_slot_for_keying(), blender::BLI_assert(), BLI_assert_msg, ELEM, get_action(), blender::animrig::Action::get_layer_for_keyframing(), layer, blender::animrig::Action::layer_keystrip_ensure(), and prep_action_layer_for_keying().
Referenced by insert_keyframes(), and prep_action_layer_for_keying().
| void blender::animrig::relative_keyingset_add_source | ( | Vector< PointerRNA > & | sources, |
| ID * | id ) |
Definition at line 184 of file animrig/intern/keyingsets.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), relative_keyingset_add_source(), and blender::RNA_id_pointer_create().
| void blender::animrig::relative_keyingset_add_source | ( | Vector< PointerRNA > & | sources, |
| ID * | id, | ||
| StructRNA * | srna, | ||
| void * | data ) |
Add another data source for Relative Keying Sets to be evaluated with.
Definition at line 173 of file animrig/intern/keyingsets.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::data, ELEM, relative_keyingset_add_source(), and blender::RNA_pointer_create_discrete().
Referenced by autokeyframe_object(), autokeyframe_object(), autokeyframe_pchan(), autokeyframe_pose_channel(), blender::pose_clear_transform_generic_exec(), relative_keyingset_add_source(), and relative_keyingset_add_source().
|
static |
Move the point where a key is about to be inserted to be inside the main cycle range. Returns the type of the cycle if it is enabled and valid.
Definition at line 391 of file animrig/intern/fcurve.cc.
References blender::FCurve::bezt, blender::data, blender::FCM_EXTRAPOLATE_CYCLIC_OFFSET, blender::FCU_CYCLE_NONE, blender::FCU_CYCLE_OFFSET, floorf, blender::FCurve::modifiers, position, remap_cyclic_keyframe_location(), step, blender::FCurve::totvert, and blender::BezTriple::vec.
Referenced by insert_vert_fcurve(), and remap_cyclic_keyframe_location().
|
static |
Definition at line 516 of file animrig/intern/fcurve.cc.
References ALL, blender::FCurve::bezt, blender::BKE_fcurve_bezt_binarysearch_index(), blender::BKE_fcurve_delete_keys(), blender::BKE_fcurve_delete_keys_all(), IN_RANGE, OUT_RANGE, remove_fcurve_key_range(), and blender::FCurve::totvert.
Referenced by bake_fcurve(), and remove_fcurve_key_range().
|
static |
Definition at line 148 of file animrig/intern/fcurve.cc.
References blender::BezTriple::f1, blender::BezTriple::f2, blender::BezTriple::f3, replace_bezt_keyframe_ypos(), and blender::BezTriple::vec.
Referenced by insert_bezt_fcurve(), and replace_bezt_keyframe_ypos().
|
static |
Definition at line 198 of file animrig/intern/keyingsets.cc.
References C, blender::KeyingSetInfo::generate, and RKS_ITER_overrides_list().
Referenced by RKS_ITER_overrides_list(), and validate_keyingset().
| Array< float > blender::animrig::rna_property_get_as_float | ( | PointerRNA & | ptr, |
| PropertyRNA & | prop ) |
Returns the given property values as a float array. In case the property is not an array, the array length is 1. Casts non-float values to float. Calling this with unsupported property types is invalid and returns an array of length 0.
Definition at line 253 of file anim_rna.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::PROP_BOOLEAN, blender::PROP_FLOAT, blender::PROP_INT, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::RNA_property_array_check(), blender::RNA_property_array_length(), blender::RNA_property_boolean_get(), blender::RNA_property_boolean_get_index(), blender::RNA_property_float_get(), blender::RNA_property_float_get_array(), rna_property_get_as_float(), blender::RNA_property_int_get(), blender::RNA_property_int_get_index(), and blender::RNA_property_type().
Referenced by rna_property_get_as_float(), and blender::store_property_snapshot().
| void blender::animrig::rna_property_set_as_float | ( | PointerRNA & | ptr, |
| PropertyRNA & | prop, | ||
| Span< float > | values ) |
Sets the given property to the given values. The size of values has to match the property array length. In case the property is not an array, only the first index is used. This is an abstraction around RNA properties to deal with them as float regardless of their actual type.
Definition at line 301 of file anim_rna.cc.
References BLI_assert_unreachable, blender::Span< T >::data(), blender::Span< T >::index_range(), blender::PROP_BOOLEAN, blender::PROP_FLOAT, blender::PROP_INT, blender::RNA_property_array_check(), blender::RNA_property_array_length(), blender::RNA_property_boolean_set(), blender::RNA_property_boolean_set_index(), blender::RNA_property_float_set(), blender::RNA_property_float_set_array(), blender::RNA_property_int_set(), blender::RNA_property_int_set_index(), rna_property_set_as_float(), blender::RNA_property_type(), and blender::Span< T >::size().
Referenced by blender::pose_slide_apply_property_snapshots(), rna_property_set_as_float(), and blender::slide_subjects_reset().
|
static |
Definition at line 142 of file pose.cc.
References blender::ROT_MODE_EUL, and rotation_mode_is_euler().
Referenced by animsys_blend_in_fcurves(), and rotation_mode_is_euler().
| void blender::animrig::sample_fcurve_segment | ( | const FCurve * | fcu, |
| float | start_frame, | ||
| float | sample_rate, | ||
| float * | samples, | ||
| int | sample_count ) |
| sample_rate | indicates how many samples per frame should be generated. |
| samples | Is expected to be an array large enough to hold sample_count. |
Definition at line 504 of file animrig/intern/fcurve.cc.
References blender::evaluate_fcurve(), float, and sample_fcurve_segment().
Referenced by bake_fcurve(), blender::btw_smooth_allocate_operator_data(), blender::btw_smooth_graph_keys(), blender::gaussian_smooth_allocate_operator_data(), blender::gaussian_smooth_graph_keys(), and sample_fcurve_segment().
Get the active Keying Set for the given scene.
Definition at line 154 of file animrig/intern/keyingsets.cc.
References blender::Scene::active_keyingset, blender::BLI_findlink(), blender::builtin_keyingsets, blender::Scene::keyingsets, and scene_get_active_keyingset().
Referenced by autokeyframe_object(), autokeyframe_pose_channel(), blender::delete_key_v3d_exec(), blender::delete_key_vse_exec(), get_keyingset_for_autokeying(), blender::pose_select_same_keyingset(), scene_get_active_keyingset(), and blender::ed::object::select_grouped_keyingset().
|
static |
Definition at line 124 of file animrig/intern/action.cc.
References blender::BLI_assert(), blender::MEM_new_array_zeroed(), blender::num, shrink_array(), T, and blender::uninitialized_move_n().
Referenced by blender::animrig::Channelbag::fcurve_create_many(), and shrink_array().
|
static |
Definition at line 144 of file animrig/intern/action.cc.
References blender::BLI_assert(), blender::MEM_new_array_zeroed(), blender::num, shrink_array_and_remove(), T, and blender::uninitialized_move_n().
Referenced by move_slot(), and shrink_array_and_remove().
|
static |
Same as shrink_array_and_remove() above, except instead of shifting all the elements after the removed item over to fill the gap, it just swaps in the last element to where the removed element was.
Definition at line 163 of file animrig/intern/action.cc.
References blender::BLI_assert(), blender::MEM_new_array_zeroed(), blender::num, shrink_array_and_swap_remove(), T, and blender::uninitialized_move_n().
Referenced by shrink_array_and_swap_remove(), and blender::animrig::Action::strip_keyframe_data_remove_if_unused().
Definition at line 373 of file animrig/intern/action.cc.
References blender::BLI_uniquename_cb(), blender::ActionSlot::identifier, slot_identifier_ensure_unique(), and blender::animrig::Action::slots().
Referenced by duplicate_slot(), move_slot(), blender::animrig::Action::slot_add(), blender::animrig::Action::slot_add_for_id_type(), blender::animrig::Action::slot_display_name_define(), blender::animrig::Action::slot_identifier_define(), slot_identifier_ensure_unique(), and blender::animrig::Action::slot_idtype_define().
|
static |
Definition at line 558 of file animrig/intern/action.cc.
References slot_ptr_destructor().
Referenced by slot_ptr_destructor(), and blender::animrig::Action::slot_remove().
|
static |
Definition at line 937 of file animrig/intern/action.cc.
References strip_ptr_destructor().
Referenced by strip_ptr_destructor(), and blender::animrig::Layer::strip_remove().
|
static |
Update the FCurve to allow insertion of bezt without modifying the curve shape.
Checks whether it is necessary to apply Bezier subdivision due to involvement of non-auto handles. If necessary, changes bezt handles from Auto to Aligned.
| bezt | key being inserted |
| prev | keyframe before that key |
| next | keyframe after that key |
Definition at line 258 of file animrig/intern/fcurve.cc.
References blender::FCurve::auto_smoothing, blender::BEZT_IPO_BEZ, BEZT_IS_AUTOH, blender::BKE_fcurve_bezt_subdivide_handles(), fabsf, blender::FCURVE_SMOOTH_CONT_ACCEL, blender::BezTriple::h1, blender::BezTriple::h2, blender::HD_ALIGN, blender::HD_VECT, blender::BezTriple::ipo, subdivide_nonauto_handles(), and blender::BezTriple::vec.
Referenced by insert_vert_fcurve(), and subdivide_nonauto_handles().
|
nodiscard |
Un-assign the Action assigned to this ID.
Same as calling assign_action(nullptr, animated_id).
Definition at line 1199 of file animrig/intern/action.cc.
References assign_action(), and unassign_action().
Referenced by blender::action_stash_create_exec(), blender::action_stash_exec(), blender::ed::transform::animrecord_check_state(), blender::BKE_animdata_free(), blender::BKE_nla_action_pushdown(), blender::BKE_nla_tweakmode_enter(), blender::ed::space_node::ensure_separate_actions(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), unassign_action(), and unassign_action().
|
nodiscard |
Un-assign the Action assigned to this ID.
Same as calling assign_action(nullptr, owned_adt).
Definition at line 1204 of file animrig/intern/action.cc.
References assign_action(), and unassign_action().
| void blender::animrig::update_autoflags_fcurve_direct | ( | FCurve * | fcu, |
| PropertyType | prop_type ) |
Ensure FCurve flags are correct for the property type it animates.
Definition at line 266 of file animrig/intern/keyframing.cc.
References blender::FCURVE_DISCRETE_VALUES, fcurve_flags_for_property_type(), blender::FCURVE_INT_VALUES, blender::FCurve::flag, and update_autoflags_fcurve_direct().
Referenced by blender::fcurves_path_rename_fix(), insert_keyframe_direct(), blender::animrig::nla::insert_keyframe_direct(), blender::animrig::StripKeyframeData::keyframe_insert(), blender::update_autoflags_fcurve(), and update_autoflags_fcurve_direct().
| ModifyKeyReturn blender::animrig::validate_keyingset | ( | bContext * | C, |
| Vector< PointerRNA > * | sources, | ||
| KeyingSet * | keyingset ) |
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.
Definition at line 209 of file animrig/intern/keyingsets.cc.
References blender::BKE_keyingset_free_paths(), C, blender::KeyingSet::flag, INVALID_CONTEXT, blender::KeyingSetInfo::iter, blender::KEYINGSET_ABSOLUTE, keyingset_info_find_name(), MISSING_TYPEINFO, blender::KeyingSet::paths, blender::KeyingSetInfo::poll, RKS_ITER_overrides_list(), SUCCESS, blender::KeyingSet::typeinfo, and validate_keyingset().
Referenced by apply_keyingset(), blender::pose_select_same_keyingset(), blender::ed::object::select_grouped_keyingset(), and validate_keyingset().
| bool blender::animrig::visualkey_can_use | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop ) |
This helper function determines if visual-keyframing should be used when inserting keyframes for the given channel. As visual-keyframing only works on Object and Pose-Channel blocks, this should only get called for those block-types, when using "standard" keying but 'Visual Keying' option in Auto-Keying settings is on.
Definition at line 37 of file visualkey.cc.
References BLI_assert_msg, blender::bPoseChannel::constflag, blender::CONSTRAINT_DISABLE, blender::CONSTRAINT_TYPE_ARMATURE, blender::CONSTRAINT_TYPE_CHILDOF, blender::CONSTRAINT_TYPE_DAMPTRACK, blender::CONSTRAINT_TYPE_DISTLIMIT, blender::CONSTRAINT_TYPE_FOLLOWPATH, blender::CONSTRAINT_TYPE_KINEMATIC, blender::CONSTRAINT_TYPE_LOCKTRACK, blender::CONSTRAINT_TYPE_LOCLIKE, blender::CONSTRAINT_TYPE_LOCLIMIT, blender::CONSTRAINT_TYPE_MINMAX, blender::CONSTRAINT_TYPE_ROTLIKE, blender::CONSTRAINT_TYPE_ROTLIMIT, blender::CONSTRAINT_TYPE_SIZELIKE, blender::CONSTRAINT_TYPE_SIZELIMIT, blender::CONSTRAINT_TYPE_TRACKTO, blender::CONSTRAINT_TYPE_TRANSFORM, blender::CONSTRAINT_TYPE_TRANSLIKE, blender::bPoseChannel::constraints, blender::Object::constraints, blender::PointerRNA::data, blender::bConstraint::enforce, blender::bConstraint::flag, blender::bConstraint::next, blender::bPoseChannel::parent, blender::Object::parent, blender::PCHAN_HAS_IK, blender::PCHAN_INFLUENCED_BY_IK, blender::gpu::shader::metadata::printf, blender::RBO_TYPE_ACTIVE, blender::Object::rigidbody_object, blender::RNA_property_identifier(), blender::bConstraint::type, blender::PointerRNA::type, blender::RigidBodyOb::type, visualkey_can_use(), VISUALKEY_LOC, VISUALKEY_NONE, VISUALKEY_ROT, and VISUALKEY_SCA.
Referenced by get_property_values(), and visualkey_can_use().
| Vector< float > blender::animrig::visualkey_get_values | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop ) |
This helper function extracts the value to use for visual-keyframing In the event that it is not possible to perform visual keying, try to fall-back to using the default method. Assumes that all data it has been passed is valid.
Definition at line 197 of file visualkey.cc.
References blender::BKE_armature_mat_pose_to_bone(), blender::BONE_CONNECTED, blender::copy_m4_m4(), blender::PointerRNA::data, blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::Bone::flag, get_rna_values(), blender::mat4_to_axis_angle(), blender::mat4_to_eulO(), blender::mat4_to_quat(), blender::mat4_to_size(), blender::PointerRNA::owner_id, blender::Bone::parent, blender::bPoseChannel::pose_mat, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::RNA_property_identifier(), blender::bPoseChannel::rotmode, blender::Object::rotmode, blender::PointerRNA::type, and visualkey_get_values().
Referenced by get_property_values(), and visualkey_get_values().
|
constexpr |
Definition at line 20 of file ANIM_armature.hh.
Referenced by blender::add_points_bone(), blender::ARMATURE_OT_bone_primitive_add(), blender::ed::transform::createBoneSpace(), blender::ed_armature_bone_unique_name(), blender::ED_armature_ebone_add_primitive(), and blender::ED_armature_ebone_unique_name().
|
constexpr |
Definition at line 83 of file anim_rna.cc.
Referenced by get_pose_bone_rna_path().