Blender  V2.93
Typedefs | Enumerations | Functions
BKE_action.h File Reference

Blender kernel action and pose functionality. More...

#include "DNA_listBase.h"

Go to the source code of this file.

Typedefs

typedef enum eAction_TransformFlags eAction_TransformFlags
 

Enumerations

enum  eAction_TransformFlags {
  ACT_TRANS_LOC = (1 << 0) , ACT_TRANS_ROT = (1 << 1) , ACT_TRANS_SCALE = (1 << 2) , ACT_TRANS_BBONE = (1 << 3) ,
  ACT_TRANS_PROP = (1 << 4) , ACT_TRANS_ONLY = (ACT_TRANS_LOC | ACT_TRANS_ROT | ACT_TRANS_SCALE) , ACT_TRANS_ALL = (ACT_TRANS_ONLY | ACT_TRANS_PROP)
}
 

Functions

struct bActionBKE_action_add (struct Main *bmain, const char name[])
 
short action_get_item_transforms (struct bAction *act, struct Object *ob, struct bPoseChannel *pchan, ListBase *curves)
 
void calc_action_range (const struct bAction *act, float *start, float *end, short incl_modifiers)
 
bool action_has_motion (const struct bAction *act)
 
struct bActionGroupget_active_actiongroup (struct bAction *act)
 
void set_active_action_group (struct bAction *act, struct bActionGroup *agrp, short select)
 
void action_group_colors_sync (struct bActionGroup *grp, const struct bActionGroup *ref_grp)
 
struct bActionGroupaction_groups_add_new (struct bAction *act, const char name[])
 
void action_groups_add_channel (struct bAction *act, struct bActionGroup *agrp, struct FCurve *fcurve)
 
void action_groups_remove_channel (struct bAction *act, struct FCurve *fcu)
 
void BKE_action_groups_reconstruct (struct bAction *act)
 
struct bActionGroupBKE_action_group_find_name (struct bAction *act, const char name[])
 
void action_groups_clear_tempflags (struct bAction *act)
 
void BKE_pose_channel_free (struct bPoseChannel *pchan)
 
void BKE_pose_channel_free_ex (struct bPoseChannel *pchan, bool do_id_user)
 
void BKE_pose_channel_runtime_reset (struct bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_runtime_reset_on_copy (struct bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_runtime_free (struct bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_free_bbone_cache (struct bPoseChannel_Runtime *runtime)
 
void BKE_pose_channels_free (struct bPose *pose)
 
void BKE_pose_channels_free_ex (struct bPose *pose, bool do_id_user)
 
void BKE_pose_channels_hash_make (struct bPose *pose)
 
void BKE_pose_channels_hash_free (struct bPose *pose)
 
void BKE_pose_channels_remove (struct Object *ob, bool(*filter_fn)(const char *bone_name, void *user_data), void *user_data)
 
void BKE_pose_free_data_ex (struct bPose *pose, bool do_id_user)
 
void BKE_pose_free_data (struct bPose *pose)
 
void BKE_pose_free (struct bPose *pose)
 
void BKE_pose_free_ex (struct bPose *pose, bool do_id_user)
 
void BKE_pose_copy_data_ex (struct bPose **dst, const struct bPose *src, const int flag, const bool copy_constraints)
 
void BKE_pose_copy_data (struct bPose **dst, const struct bPose *src, const bool copy_constraints)
 
void BKE_pose_channel_copy_data (struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from)
 
void BKE_pose_channel_session_uuid_generate (struct bPoseChannel *pchan)
 
struct bPoseChannelBKE_pose_channel_find_name (const struct bPose *pose, const char *name)
 
struct bPoseChannelBKE_pose_channel_active (struct Object *ob)
 
struct bPoseChannelBKE_pose_channel_active_or_first_selected (struct Object *ob)
 
struct bPoseChannelBKE_pose_channel_verify (struct bPose *pose, const char *name)
 
struct bPoseChannelBKE_pose_channel_get_mirrored (const struct bPose *pose, const char *name)
 
void BKE_pose_check_uuids_unique_and_report (const struct bPose *pose)
 
bool BKE_pose_channels_is_valid (const struct bPose *pose)
 
void BKE_pose_update_constraint_flags (struct bPose *pose)
 
void BKE_pose_tag_update_constraint_flags (struct bPose *pose)
 
const char * BKE_pose_ikparam_get_name (struct bPose *pose)
 
void BKE_pose_ikparam_init (struct bPose *pose)
 
void BKE_pose_itasc_init (struct bItasc *itasc)
 
bool BKE_pose_channel_in_IK_chain (struct Object *ob, struct bPoseChannel *pchan)
 
struct bActionGroupBKE_pose_add_group (struct bPose *pose, const char *name)
 
void BKE_pose_remove_group (struct bPose *pose, struct bActionGroup *grp, const int index)
 
void BKE_pose_remove_group_index (struct bPose *pose, const int index)
 
void what_does_obaction (struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], const struct AnimationEvalContext *anim_eval_context)
 
void BKE_pose_copy_pchan_result (struct bPoseChannel *pchanto, const struct bPoseChannel *pchanfrom)
 
bool BKE_pose_copy_result (struct bPose *to, struct bPose *from)
 
void BKE_pose_rest (struct bPose *pose, bool selected_bones_only)
 
void BKE_pose_tag_recalc (struct Main *bmain, struct bPose *pose)
 
void BKE_pose_blend_write (struct BlendWriter *writer, struct bPose *pose, struct bArmature *arm)
 
void BKE_pose_blend_read_data (struct BlendDataReader *reader, struct bPose *pose)
 
void BKE_pose_blend_read_lib (struct BlendLibReader *reader, struct Object *ob, struct bPose *pose)
 
void BKE_pose_blend_read_expand (struct BlendExpander *expander, struct bPose *pose)
 
void BKE_action_flip_with_pose (struct bAction *act, struct Object *ob_arm)
 

Detailed Description

Blender kernel action and pose functionality.

Definition in file BKE_action.h.

Typedef Documentation

◆ eAction_TransformFlags

Enumeration Type Documentation

◆ eAction_TransformFlags

Enumerator
ACT_TRANS_LOC 
ACT_TRANS_ROT 
ACT_TRANS_SCALE 
ACT_TRANS_BBONE 
ACT_TRANS_PROP 
ACT_TRANS_ONLY 
ACT_TRANS_ALL 

Definition at line 61 of file BKE_action.h.

Function Documentation

◆ action_get_item_transforms()

short action_get_item_transforms ( struct bAction act,
struct Object ob,
struct bPoseChannel pchan,
ListBase curves 
)

◆ action_group_colors_sync()

void action_group_colors_sync ( struct bActionGroup grp,
const struct bActionGroup ref_grp 
)

◆ action_groups_add_channel()

void action_groups_add_channel ( struct bAction act,
struct bActionGroup agrp,
struct FCurve fcurve 
)

◆ action_groups_add_new()

struct bActionGroup* action_groups_add_new ( struct bAction act,
const char  name[] 
)

◆ action_groups_clear_tempflags()

void action_groups_clear_tempflags ( struct bAction act)

◆ action_groups_remove_channel()

void action_groups_remove_channel ( struct bAction act,
struct FCurve fcu 
)

◆ action_has_motion()

bool action_has_motion ( const struct bAction act)

◆ BKE_action_add()

struct bAction* BKE_action_add ( struct Main bmain,
const char  name[] 
)

◆ BKE_action_flip_with_pose()

void BKE_action_flip_with_pose ( struct bAction act,
struct Object ob_arm 
)

◆ BKE_action_group_find_name()

struct bActionGroup* BKE_action_group_find_name ( struct bAction act,
const char  name[] 
)

◆ BKE_action_groups_reconstruct()

void BKE_action_groups_reconstruct ( struct bAction act)

◆ BKE_pose_add_group()

struct bActionGroup* BKE_pose_add_group ( struct bPose pose,
const char *  name 
)

◆ BKE_pose_blend_read_data()

void BKE_pose_blend_read_data ( struct BlendDataReader reader,
struct bPose pose 
)

◆ BKE_pose_blend_read_expand()

void BKE_pose_blend_read_expand ( struct BlendExpander expander,
struct bPose pose 
)

◆ BKE_pose_blend_read_lib()

void BKE_pose_blend_read_lib ( struct BlendLibReader reader,
struct Object ob,
struct bPose pose 
)

◆ BKE_pose_blend_write()

void BKE_pose_blend_write ( struct BlendWriter writer,
struct bPose pose,
struct bArmature arm 
)

◆ BKE_pose_channel_active()

struct bPoseChannel* BKE_pose_channel_active ( Object ob)

◆ BKE_pose_channel_active_or_first_selected()

struct bPoseChannel* BKE_pose_channel_active_or_first_selected ( struct Object ob)

Use this when detecting the "other selected bone", when we have multiple armatures in pose mode.

In this case the active-selected is an obvious choice when finding the target for a constraint for eg. however from the users perspective the active pose bone of the active object is the real active bone, so any other non-active selected bone is a candidate for being the other selected bone, see: T58447.

Definition at line 736 of file action.c.

References BKE_pose_channel_active(), bPoseChannel::bone, BONE_SELECTED, bPose::chanbase, Object::data, ELEM, ListBase::first, Bone::flag, if(), bPoseChannel::next, NULL, PBONE_VISIBLE, and Object::pose.

Referenced by get_new_constraint_target().

◆ BKE_pose_channel_copy_data()

void BKE_pose_channel_copy_data ( struct bPoseChannel pchan,
const struct bPoseChannel pchan_from 
)

Referenced by copy_pchan().

◆ BKE_pose_channel_find_name()

struct bPoseChannel* BKE_pose_channel_find_name ( const struct bPose pose,
const char *  name 
)

Referenced by action_flip_pchan(), AnimationImporter::add_bone_animation_sampled(), add_verts_to_dgroups(), animchan_sync_group(), apply_armature_pose2bones_exec(), AnimationImporter::apply_matrix_curves(), applyarmature_process_selected_recursive(), armature_deform_coords_impl(), armdef_evaluate(), armdef_get_tarmat(), bc_bone_matrix_local_get(), BKE_gpencil_layer_transform_matrix_get(), BKE_gpencil_update_layer_transforms(), BKE_object_defgroup_selected_get(), BKE_object_modifier_gpencil_hook_reset(), BKE_object_modifier_hook_reset(), BKE_pose_eval_proxy_copy_bone(), bone_skinnable_cb(), brush_draw_apply(), blender::deg::DepsgraphRelationBuilder::build_driver_data(), blender::deg::DepsgraphRelationBuilder::build_driver_variables(), buttons_context_path_pose_bone(), blender::deg::DepsgraphBuilder::check_pchan_has_bbone_segments(), clear_anim_v3d_exec(), click_select_channel_group(), compute_vertex_mask__armature_mode(), constraint_target_to_mat4(), copy_animedit_keys(), deformStroke(), deformVerts_do(), DEG_get_evaluated_rna_pointer(), delete_key_v3d_exec(), dgroup_skinnable_cb(), draw_armature_pose(), dvar_eval_locDiff(), dvar_eval_rotDiff(), dvar_eval_transChan(), ED_armature_bone_rename(), ED_gpencil_reset_layers_parent(), ED_object_jump_to_bone(), ED_wpaint_ensure_data(), SkinInfo::get_pose_channel_from_node(), gpencil_add_verts_to_dgroups(), gpencil_bone_skinnable_cb(), blender::deg::BoneComponentNode::init(), matrix_from_obj_pchan(), MOD_get_texture_coords(), motionpaths_calc_bake_targets(), ob_parbone(), pchan_duplicate_map(), pose_bone_do_paste(), pose_channel_find_bone(), pose_clear_transform_generic_exec(), pose_foreachScreenBone(), pose_grab_with_ik_children(), pose_proxy_sync(), pose_select_constraint_target_exec(), pose_select_same_keyingset(), poselib_apply_pose(), poselib_backup_posecopy(), poselib_keytag_pose(), postEditBoneDuplicate(), rebuild_pose_bone(), select_pchan_for_action_group(), select_similar_data_pchan(), skip_fcurve_selected_data(), snap_sel_to_grid_exec(), AnimationImporter::translate_animation_OLD(), updateDepsgraph(), updateDuplicateActionConstraintSettings(), and view3d_viewmatrix_set().

◆ BKE_pose_channel_free()

void BKE_pose_channel_free ( struct bPoseChannel pchan)

◆ BKE_pose_channel_free_bbone_cache()

void BKE_pose_channel_free_bbone_cache ( bPoseChannel_Runtime runtime)

◆ BKE_pose_channel_free_ex()

void BKE_pose_channel_free_ex ( bPoseChannel pchan,
bool  do_id_user 
)

◆ BKE_pose_channel_get_mirrored()

struct bPoseChannel* BKE_pose_channel_get_mirrored ( const struct bPose pose,
const char *  name 
)

◆ BKE_pose_channel_in_IK_chain()

bool BKE_pose_channel_in_IK_chain ( struct Object ob,
struct bPoseChannel pchan 
)

Definition at line 939 of file action.c.

References pose_channel_in_IK_chain().

◆ BKE_pose_channel_runtime_free()

void BKE_pose_channel_runtime_free ( bPoseChannel_Runtime runtime)

Deallocates runtime cache of a pose channel

Definition at line 1102 of file action.c.

References BKE_pose_channel_free_bbone_cache().

Referenced by BKE_pose_channel_free_ex(), and blender::deg::ObjectRuntimeBackup::restore_pose_channel_runtime_data().

◆ BKE_pose_channel_runtime_reset()

void BKE_pose_channel_runtime_reset ( bPoseChannel_Runtime runtime)

Clears the runtime cache of a pose channel without free.

Definition at line 1088 of file action.c.

Referenced by blender::deg::ObjectRuntimeBackup::backup_pose_channel_runtime_data(), and BKE_pose_blend_read_data().

◆ BKE_pose_channel_runtime_reset_on_copy()

void BKE_pose_channel_runtime_reset_on_copy ( struct bPoseChannel_Runtime runtime)

Definition at line 1094 of file action.c.

References bPoseChannel_Runtime::session_uuid.

Referenced by BKE_pose_copy_data_ex(), and pose_proxy_sync().

◆ BKE_pose_channel_session_uuid_generate()

void BKE_pose_channel_session_uuid_generate ( struct bPoseChannel pchan)

◆ BKE_pose_channel_verify()

struct bPoseChannel* BKE_pose_channel_verify ( bPose pose,
const char *  name 
)

◆ BKE_pose_channels_free()

void BKE_pose_channels_free ( struct bPose pose)

Definition at line 1143 of file action.c.

References BKE_pose_channels_free_ex().

◆ BKE_pose_channels_free_ex()

void BKE_pose_channels_free_ex ( bPose pose,
bool  do_id_user 
)

Removes and deallocates all channels from a pose. Does not free the pose itself.

Definition at line 1126 of file action.c.

References BKE_pose_channel_free_ex(), BKE_pose_channels_hash_free(), BLI_freelistN(), bPose::chan_array, bPose::chanbase, ListBase::first, MEM_SAFE_FREE, and bPoseChannel::next.

Referenced by BKE_pose_channels_free(), and BKE_pose_free_data_ex().

◆ BKE_pose_channels_hash_free()

void BKE_pose_channels_hash_free ( struct bPose pose)

◆ BKE_pose_channels_hash_make()

void BKE_pose_channels_hash_make ( bPose pose)

◆ BKE_pose_channels_is_valid()

bool BKE_pose_channels_is_valid ( const struct bPose pose)

Referenced by ED_armature_bone_rename().

◆ BKE_pose_channels_remove()

void BKE_pose_channels_remove ( Object ob,
bool(*)(const char *bone_name, void *user_data filter_fn,
void *  user_data 
)

◆ BKE_pose_check_uuids_unique_and_report()

void BKE_pose_check_uuids_unique_and_report ( const struct bPose pose)

◆ BKE_pose_copy_data()

void BKE_pose_copy_data ( struct bPose **  dst,
const struct bPose src,
const bool  copy_constraints 
)

◆ BKE_pose_copy_data_ex()

void BKE_pose_copy_data_ex ( struct bPose **  dst,
const struct bPose src,
const int  flag,
const bool  copy_constraints 
)

Referenced by copy_object_pose().

◆ BKE_pose_copy_pchan_result()

void BKE_pose_copy_pchan_result ( struct bPoseChannel pchanto,
const struct bPoseChannel pchanfrom 
)

◆ BKE_pose_copy_result()

bool BKE_pose_copy_result ( struct bPose to,
struct bPose from 
)

◆ BKE_pose_free()

void BKE_pose_free ( struct bPose pose)

Definition at line 1184 of file action.c.

References BKE_pose_free_ex().

Referenced by object_blend_read_lib().

◆ BKE_pose_free_data()

void BKE_pose_free_data ( struct bPose pose)

Definition at line 1167 of file action.c.

References BKE_pose_free_data_ex().

Referenced by actcon_get_tarmat().

◆ BKE_pose_free_data_ex()

void BKE_pose_free_data_ex ( struct bPose pose,
bool  do_id_user 
)

◆ BKE_pose_free_ex()

void BKE_pose_free_ex ( bPose pose,
bool  do_id_user 
)

Removes and deallocates all data from a pose, and also frees the pose.

Definition at line 1175 of file action.c.

References BKE_pose_free_data_ex(), and MEM_freeN.

Referenced by BKE_pose_free(), and object_free_data().

◆ BKE_pose_ikparam_get_name()

const char* BKE_pose_ikparam_get_name ( struct bPose pose)

Definition at line 775 of file action.c.

References bPose::iksolver, IKSOLVER_ITASC, IKSOLVER_STANDARD, and NULL.

Referenced by BKE_pose_blend_write().

◆ BKE_pose_ikparam_init()

void BKE_pose_ikparam_init ( struct bPose pose)

◆ BKE_pose_itasc_init()

void BKE_pose_itasc_init ( struct bItasc itasc)

◆ BKE_pose_remove_group()

void BKE_pose_remove_group ( struct bPose pose,
struct bActionGroup grp,
const int  index 
)

◆ BKE_pose_remove_group_index()

void BKE_pose_remove_group_index ( struct bPose pose,
const int  index 
)

Definition at line 1381 of file action.c.

References bPose::agroups, BKE_pose_remove_group(), BLI_findlink(), and NULL.

Referenced by pose_group_remove_exec().

◆ BKE_pose_rest()

void BKE_pose_rest ( bPose pose,
bool  selected_bones_only 
)

◆ BKE_pose_tag_recalc()

void BKE_pose_tag_recalc ( struct Main bmain,
struct bPose pose 
)

◆ BKE_pose_tag_update_constraint_flags()

void BKE_pose_tag_update_constraint_flags ( struct bPose pose)

Definition at line 1314 of file action.c.

References bPose::flag, and POSE_CONSTRAINTS_NEED_UPDATE_FLAGS.

Referenced by ED_object_constraint_tag_update().

◆ BKE_pose_update_constraint_flags()

void BKE_pose_update_constraint_flags ( struct bPose pose)

◆ calc_action_range()

void calc_action_range ( const struct bAction act,
float start,
float end,
short  incl_modifiers 
)

◆ get_active_actiongroup()

struct bActionGroup* get_active_actiongroup ( struct bAction act)

◆ set_active_action_group()

void set_active_action_group ( struct bAction act,
struct bActionGroup agrp,
short  select 
)

◆ what_does_obaction()

void what_does_obaction ( struct Object ob,
struct Object workob,
struct bPose pose,
struct bAction act,
char  groupname[],
const struct AnimationEvalContext anim_eval_context 
)

Referenced by actcon_get_tarmat().