Blender V4.3
action.cc File Reference
#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <optional>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BLI_endian_switch.h"
#include "BLI_ghash.h"
#include "BLI_math_color.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_session_uid.h"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "BLO_read_write.hh"
#include "BKE_action.hh"
#include "BKE_anim_data.hh"
#include "BKE_anim_visualization.h"
#include "BKE_animsys.h"
#include "BKE_armature.hh"
#include "BKE_asset.hh"
#include "BKE_constraint.h"
#include "BKE_deform.hh"
#include "BKE_fcurve.hh"
#include "BKE_idprop.hh"
#include "BKE_idtype.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_main.hh"
#include "BKE_object.hh"
#include "BKE_object_types.hh"
#include "BKE_preview_image.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "BIK_api.h"
#include "RNA_access.hh"
#include "RNA_path.hh"
#include "RNA_prototypes.hh"
#include "ANIM_action.hh"
#include "ANIM_action_legacy.hh"
#include "ANIM_bone_collections.hh"
#include "ANIM_bonecolor.hh"
#include "CLG_log.h"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::bke
 

Macros

#define DNA_DEPRECATED_ALLOW
 

Functions

static void blender::bke::action_copy_data (Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag)
 
static void blender::bke::action_free_data (ID *id)
 
static void blender::bke::action_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void blender::bke::action_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void blender::bke::action_blend_read_data (BlendDataReader *reader, ID *id)
 
static IDPropertyblender::bke::action_asset_type_property (const bAction *action)
 
static void blender::bke::action_asset_metadata_ensure (void *asset_ptr, AssetMetaData *asset_data)
 
bActionBKE_action_add (Main *bmain, const char name[])
 
bActionGroupget_active_actiongroup (bAction *act)
 
void set_active_action_group (bAction *act, bActionGroup *agrp, short select)
 
void action_group_colors_sync (bActionGroup *grp, const bActionGroup *ref_grp)
 
void action_group_colors_set_from_posebone (bActionGroup *grp, const bPoseChannel *pchan)
 
void action_group_colors_set (bActionGroup *grp, const BoneColor *color)
 
bActionGroupaction_groups_add_new (bAction *act, const char name[])
 
void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve)
 
void BKE_action_groups_reconstruct (bAction *act)
 
void action_groups_remove_channel (bAction *act, FCurve *fcu)
 
bActionGroupBKE_action_group_find_name (bAction *act, const char name[])
 
void action_groups_clear_tempflags (bAction *act)
 
void BKE_pose_channel_session_uid_generate (bPoseChannel *pchan)
 
bPoseChannelBKE_pose_channel_find_name (const bPose *pose, const char *name)
 
bPoseChannelBKE_pose_channel_ensure (bPose *pose, const char *name)
 
bool BKE_pose_channels_is_valid (const bPose *pose)
 
bool BKE_pose_is_bonecoll_visible (const bArmature *arm, const bPoseChannel *pchan)
 
bPoseChannelBKE_pose_channel_active (Object *ob, const bool check_bonecoll)
 
bPoseChannelBKE_pose_channel_active_if_bonecoll_visible (Object *ob)
 
bPoseChannelBKE_pose_channel_active_or_first_selected (Object *ob)
 
bPoseChannelBKE_pose_channel_get_mirrored (const bPose *pose, const char *name)
 
const char * BKE_pose_ikparam_get_name (bPose *pose)
 
void BKE_pose_copy_data_ex (bPose **dst, const bPose *src, const int flag, const bool copy_constraints)
 
void BKE_pose_copy_data (bPose **dst, const bPose *src, const bool copy_constraints)
 
void BKE_pose_itasc_init (bItasc *itasc)
 
void BKE_pose_ikparam_init (bPose *pose)
 
static bool pose_channel_in_IK_chain (Object *ob, bPoseChannel *pchan, int level)
 
bool BKE_pose_channel_in_IK_chain (Object *ob, bPoseChannel *pchan)
 
void BKE_pose_channels_hash_ensure (bPose *pose)
 
void BKE_pose_channels_hash_free (bPose *pose)
 
static void pose_channels_remove_internal_links (Object *ob, bPoseChannel *unlinked_pchan)
 
void BKE_pose_channels_remove (Object *ob, bool(*filter_fn)(const char *bone_name, void *user_data), void *user_data)
 
void BKE_pose_channel_free_ex (bPoseChannel *pchan, bool do_id_user)
 
void BKE_pose_channel_runtime_reset (bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_runtime_reset_on_copy (bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_runtime_free (bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_free_bbone_cache (bPoseChannel_Runtime *runtime)
 
void BKE_pose_channel_free (bPoseChannel *pchan)
 
void BKE_pose_channels_free_ex (bPose *pose, bool do_id_user)
 
void BKE_pose_channels_free (bPose *pose)
 
void BKE_pose_free_data_ex (bPose *pose, bool do_id_user)
 
void BKE_pose_free_data (bPose *pose)
 
void BKE_pose_free_ex (bPose *pose, bool do_id_user)
 
void BKE_pose_free (bPose *pose)
 
void BKE_pose_channel_copy_data (bPoseChannel *pchan, const bPoseChannel *pchan_from)
 
void BKE_pose_update_constraint_flags (bPose *pose)
 
void BKE_pose_tag_update_constraint_flags (bPose *pose)
 
bActionGroupBKE_pose_add_group (bPose *pose, const char *name)
 
void BKE_pose_remove_group (bPose *pose, bActionGroup *grp, const int index)
 
void BKE_pose_remove_group_index (bPose *pose, const int index)
 
void BKE_pose_rest (bPose *pose, bool selected_bones_only)
 
void BKE_pose_copy_pchan_result (bPoseChannel *pchanto, const bPoseChannel *pchanfrom)
 
bool BKE_pose_copy_result (bPose *to, bPose *from)
 
void BKE_pose_tag_recalc (Main *bmain, bPose *pose)
 
void what_does_obaction (Object *ob, Object *workob, bPose *pose, bAction *act, const int32_t action_slot_handle, char groupname[], const AnimationEvalContext *anim_eval_context)
 
void BKE_pose_check_uids_unique_and_report (const bPose *pose)
 
void BKE_pose_blend_write (BlendWriter *writer, bPose *pose, bArmature *arm)
 
void BKE_pose_blend_read_data (BlendDataReader *reader, ID *id_owner, bPose *pose)
 
void BKE_pose_blend_read_after_liblink (BlendLibReader *reader, Object *ob, bPose *pose)
 
void BKE_action_fcurves_clear (bAction *act)
 

Variables

static CLG_LogRef LOG = {"bke.action"}
 
static AssetTypeInfo blender::bke::AssetType_AC
 
IDTypeInfo IDType_ID_AC
 

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 18 of file blenkernel/intern/action.cc.

Function Documentation

◆ action_group_colors_set()

void action_group_colors_set ( bActionGroup * grp,
const BoneColor * color )

◆ action_group_colors_set_from_posebone()

void action_group_colors_set_from_posebone ( bActionGroup * grp,
const bPoseChannel * pchan )

Set colors used on this action group, using the color of the pose bone.

If pchan->color is set to a non-default color, that is used. Otherwise the armature bone color is used.

Note that if pchan->bone is nullptr, this function silently does nothing.

Definition at line 872 of file blenkernel/intern/action.cc.

References action_group_colors_set(), blender::animrig::ANIM_bonecolor_posebone_get(), BLI_assert_msg, and bPoseChannel::bone.

Referenced by blender::animrig::action_fcurve_ensure(), and animchan_sync_group().

◆ action_group_colors_sync()

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

Sync colors used for action/bone group with theme settings.

Definition at line 842 of file blenkernel/intern/action.cc.

References ThemeWireColor::active, bActionGroup::cs, bActionGroup::customCol, rgba_uchar_args_set(), ThemeWireColor::select, ThemeWireColor::solid, and bTheme::tarm.

◆ action_groups_add_channel()

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

Add given channel into (active) group

  • assumes that channel is not linked to anything anymore
  • always adds at the end of the group
Note
This function ONLY works on legacy Actions, not on layered Actions.

Definition at line 927 of file blenkernel/intern/action.cc.

References BLI_assert, BLI_insertlinkafter(), BLI_insertlinkbefore(), BLI_listbase_is_empty(), bActionGroup::channels, bAction::curves, ELEM, ListBase::first, FCurve::grp, ListBase::last, FCurve::next, bActionGroup::prev, and FCurve::prev.

Referenced by blender::animrig::action_fcurve_ensure(), AnimationImporter::add_bone_fcurve(), animchannels_group_channels(), fcurve_add_to_list(), and updateDuplicateActionConstraintSettings().

◆ action_groups_add_new()

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

Add a new action group with the given name to the action>

Note
This function ONLY works on legacy Actions, not on layered Actions.

Definition at line 900 of file blenkernel/intern/action.cc.

References AGRP_SELECTED, BLI_addtail(), BLI_assert, BLI_uniquename(), DATA_, ELEM, bActionGroup::flag, bAction::groups, MEM_callocN, bActionGroup::name, offsetof, and STRNCPY_UTF8.

Referenced by blender::animrig::action_fcurve_ensure(), animchannels_group_channels(), and updateDuplicateActionConstraintSettings().

◆ action_groups_clear_tempflags()

void action_groups_clear_tempflags ( bAction * act)

Clear all 'temp' flags on all groups.

Note
This function supports both legacy and layered Actions.

Definition at line 1102 of file blenkernel/intern/action.cc.

References blender::animrig::legacy::channel_groups_all(), and bActionGroup::flag.

◆ action_groups_remove_channel()

void action_groups_remove_channel ( bAction * act,
FCurve * fcu )

◆ BKE_action_add()

◆ BKE_action_fcurves_clear()

void BKE_action_fcurves_clear ( bAction * act)

Remove all fcurves from the action.

Note
This function only supports legacy Actions.

Definition at line 2202 of file blenkernel/intern/action.cc.

References action_groups_remove_channel(), BKE_fcurve_free(), BLI_assert, bAction::curves, DEG_id_tag_update(), ListBase::first, bAction::id, and ID_RECALC_ANIMATION_NO_FLUSH.

◆ BKE_action_group_find_name()

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

◆ BKE_action_groups_reconstruct()

void BKE_action_groups_reconstruct ( bAction * act)

Reconstruct channel pointers. Assumes that the groups referred to by the FCurves are already in act->groups. Reorders the main channel list to match group order.

Note
This function ONLY works on legacy Actions, not on layered Actions.

Definition at line 997 of file blenkernel/intern/action.cc.

References BLI_addtail(), BLI_assert, BLI_findindex(), BLI_listbase_clear(), BLI_listbase_is_empty(), BLI_movelisttolist(), bAction::curves, bAction::groups, LISTBASE_FOREACH, and LISTBASE_FOREACH_MUTABLE.

Referenced by blo_do_versions_300(), ED_curve_updateAnimPaths(), and blender::bke::tests::TEST().

◆ BKE_pose_add_group()

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

Adds a new bone-group (name may be NULL).

Definition at line 1773 of file blenkernel/intern/action.cc.

References bPose::active_group, bPose::agroups, BLI_addtail(), BLI_listbase_count(), BLI_uniquename(), DATA_, MEM_callocN, bActionGroup::name, offsetof, and STRNCPY.

◆ BKE_pose_blend_read_after_liblink()

◆ BKE_pose_blend_read_data()

◆ BKE_pose_blend_write()

◆ BKE_pose_channel_active()

bPoseChannel * BKE_pose_channel_active ( Object * ob,
bool check_bonecoll )

Find the active pose-channel for an object

Parameters
check_bonecollchecks if the bone is on a visible bone collection (this might be skipped (e.g. for "Show Active" from the Outliner).
Returns
bPoseChannel if found or NULL.
Note
Object, not bPose is used here, as we need info (collection/active bone) from Armature.

Definition at line 1202 of file blenkernel/intern/action.cc.

References bArmature::act_bone, ANIM_bone_in_visible_collection(), bPose::chanbase, Object::data, ELEM, LISTBASE_FOREACH, and Object::pose.

Referenced by BKE_pose_channel_active_if_bonecoll_visible(), handle_armature_parent_orientation(), and blender::ed::outliner::outliner_show_active_get_element().

◆ BKE_pose_channel_active_if_bonecoll_visible()

◆ BKE_pose_channel_active_or_first_selected()

bPoseChannel * BKE_pose_channel_active_or_first_selected ( 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: #58447.

Definition at line 1226 of file blenkernel/intern/action.cc.

References BKE_pose_channel_active_if_bonecoll_visible(), bPoseChannel::bone, BONE_SELECTED, bPose::chanbase, Object::data, ELEM, Bone::flag, LISTBASE_FOREACH, PBONE_VISIBLE, and Object::pose.

Referenced by blender::ed::object::get_new_constraint_target().

◆ BKE_pose_channel_copy_data()

◆ BKE_pose_channel_ensure()

◆ BKE_pose_channel_find_name()

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

Return a pointer to the pose channel of the given name from this pose.

Definition at line 1116 of file blenkernel/intern/action.cc.

References BLI_findstring(), BLI_ghash_lookup(), bPose::chanbase, bPose::chanhash, ELEM, and offsetof.

Referenced by action_flip_pchan(), 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_camera_object_dof_distance(), BKE_constraint_apply_for_pose(), 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_channel_ensure(), BKE_pose_channel_get_mirrored(), BKE_pose_copy_data_ex(), BKE_pose_copy_result(), bone_collection_assign_named_mode_specific(), bone_skinnable_cb(), blender::deg::DepsgraphRelationBuilder::build_driver_data(), blender::deg::DepsgraphRelationBuilder::build_driver_variables(), buttons_context_path_pose_bone(), can_delete_fcurve(), can_delete_key(), blender::deg::DepsgraphBuilder::check_pchan_has_bbone_segments(), click_select_channel_group(), compute_vertex_mask__armature_mode(), constraint_target_to_mat4(), copy_animedit_keys(), blender::deform_drawing(), deformVerts_do(), DEG_get_evaluated_rna_pointer(), dgroup_skinnable_cb(), blender::draw::overlay::Armatures::draw_armature_pose(), dvar_eval_locDiff(), dvar_eval_rotDiff(), dvar_eval_transChan(), ED_armature_bone_rename(), ED_wpaint_ensure_data(), SkinInfo::get_pose_channel_from_node(), blender::deg::BoneComponentNode::init(), initialize(), blender::ed::object::jump_to_bone(), matrix_from_obj_pchan(), matrix_from_obj_pchan(), mirror_pose_bone(), MOD_get_texture_coords(), motionpaths_calc_bake_targets(), ob_parbone(), pchan_duplicate_map(), pose_backup_create(), pose_bone_do_paste(), pose_channel_find_bone(), pose_channel_in_IK_chain(), pose_clear_transform_generic_exec(), pose_foreachScreenBone(), pose_grab_with_ik_children(), pose_select_constraint_target_exec(), pose_select_same_keyingset(), poselib_keytag_pose(), postEditBoneDuplicate(), blender::ed::sculpt_paint::greasepencil::process_stroke_weights(), rebuild_pose_bone(), select_pchan_for_action_group(), select_similar_data_pchan(), skip_fcurve_selected_data(), snap_sel_to_grid_exec(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), update_depsgraph(), updateDuplicateActionConstraintSettings(), updateDuplicateTransformConstraintSettings(), and view3d_viewmatrix_set().

◆ BKE_pose_channel_free()

void BKE_pose_channel_free ( bPoseChannel * pchan)

◆ BKE_pose_channel_free_bbone_cache()

◆ BKE_pose_channel_free_ex()

◆ BKE_pose_channel_get_mirrored()

◆ BKE_pose_channel_in_IK_chain()

bool BKE_pose_channel_in_IK_chain ( Object * ob,
bPoseChannel * pchan )

Checks if a bone is part of an IK chain or not.

Definition at line 1417 of file blenkernel/intern/action.cc.

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 1557 of file blenkernel/intern/action.cc.

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 1545 of file blenkernel/intern/action.cc.

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 ( bPoseChannel_Runtime * runtime)

Reset all non-persistent fields.

Definition at line 1550 of file blenkernel/intern/action.cc.

References bPoseChannel_Runtime::session_uid.

Referenced by BKE_pose_copy_data_ex().

◆ BKE_pose_channel_session_uid_generate()

◆ BKE_pose_channels_free()

void BKE_pose_channels_free ( bPose * pose)

Definition at line 1592 of file blenkernel/intern/action.cc.

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 1577 of file blenkernel/intern/action.cc.

References BKE_pose_channel_free_ex(), BKE_pose_channels_hash_free(), BLI_freelistN(), BLI_listbase_is_empty(), bPose::chan_array, bPose::chanbase, LISTBASE_FOREACH, and MEM_SAFE_FREE.

Referenced by BKE_pose_channels_free(), and BKE_pose_free_data_ex().

◆ BKE_pose_channels_hash_ensure()

void BKE_pose_channels_hash_ensure ( bPose * pose)

◆ BKE_pose_channels_hash_free()

◆ BKE_pose_channels_is_valid()

bool BKE_pose_channels_is_valid ( const bPose * pose)

◆ BKE_pose_channels_remove()

◆ BKE_pose_check_uids_unique_and_report()

◆ BKE_pose_copy_data()

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

Definition at line 1355 of file blenkernel/intern/action.cc.

References BKE_pose_copy_data_ex().

Referenced by pose_clear_user_transforms_exec().

◆ BKE_pose_copy_data_ex()

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

◆ BKE_pose_copy_pchan_result()

◆ BKE_pose_copy_result()

bool BKE_pose_copy_result ( bPose * to,
bPose * from )

Both poses should be in sync.

Definition at line 1904 of file blenkernel/intern/action.cc.

References BKE_pose_channel_find_name(), BKE_pose_copy_pchan_result(), CLOG_ERROR, LISTBASE_FOREACH, and LOG.

◆ BKE_pose_free()

void BKE_pose_free ( bPose * pose)

Definition at line 1630 of file blenkernel/intern/action.cc.

References BKE_pose_free_ex().

◆ BKE_pose_free_data()

void BKE_pose_free_data ( bPose * pose)

Definition at line 1616 of file blenkernel/intern/action.cc.

References BKE_pose_free_data_ex().

Referenced by actcon_get_tarmat().

◆ BKE_pose_free_data_ex()

void BKE_pose_free_data_ex ( 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 1621 of file blenkernel/intern/action.cc.

References BKE_pose_free_data_ex(), and MEM_freeN().

Referenced by BKE_pose_free(), object_blend_read_after_liblink(), and object_free_data().

◆ BKE_pose_ikparam_get_name()

const char * BKE_pose_ikparam_get_name ( bPose * pose)

Return the name of structure pointed by pose->ikparam.

Definition at line 1262 of file blenkernel/intern/action.cc.

References bPose::iksolver, IKSOLVER_ITASC, and IKSOLVER_STANDARD.

Referenced by BKE_pose_blend_read_data(), and BKE_pose_blend_write().

◆ BKE_pose_ikparam_init()

void BKE_pose_ikparam_init ( bPose * pose)

Allocate and initialize pose->ikparam according to pose->iksolver.

Definition at line 1377 of file blenkernel/intern/action.cc.

References BKE_pose_itasc_init(), bPose::ikparam, bPose::iksolver, IKSOLVER_ITASC, IKSOLVER_STANDARD, and MEM_callocN.

◆ BKE_pose_is_bonecoll_visible()

bool BKE_pose_is_bonecoll_visible ( const bArmature * arm,
const bPoseChannel * pchan )

Checks if the bone is on a visible bone collection

Returns
true if on a visible layer, false otherwise.

Definition at line 1197 of file blenkernel/intern/action.cc.

References ANIM_bone_in_visible_collection(), and bPoseChannel::bone.

Referenced by pose_grab_with_ik(), and stats_object_pose().

◆ BKE_pose_itasc_init()

◆ BKE_pose_remove_group()

void BKE_pose_remove_group ( bPose * pose,
bActionGroup * grp,
int index )

Remove the given bone-group (expects 'virtual' index (+1 one, used by active_group etc.)) index might be invalid ( < 1), in which case it will be find from grp.

Definition at line 1791 of file blenkernel/intern/action.cc.

References bPose::active_group, bPose::agroups, BLI_assert, BLI_findindex(), BLI_freelinkN(), BLI_listbase_is_empty(), bPose::chanbase, and LISTBASE_FOREACH.

Referenced by BKE_pose_remove_group_index().

◆ BKE_pose_remove_group_index()

void BKE_pose_remove_group_index ( bPose * pose,
int index )

Remove the indexed bone-group (expects 'virtual' index (+1 one, used by active_group etc.)).

Definition at line 1828 of file blenkernel/intern/action.cc.

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

◆ BKE_pose_rest()

void BKE_pose_rest ( bPose * pose,
bool selected_bones_only )

Zero the pose transforms for the entire pose or only for selected bones.

Definition at line 1841 of file blenkernel/intern/action.cc.

References BONE_SELECTED, bPose::chanbase, copy_v3_fl(), bPose::cyclic_offset, LISTBASE_FOREACH, POSE_BBONE_SHAPE, POSE_LOC, POSE_ROT, POSE_SIZE, bPose::stride_offset, unit_axis_angle(), unit_qt(), and zero_v3().

Referenced by pose_clear_user_transforms_exec().

◆ BKE_pose_tag_recalc()

void BKE_pose_tag_recalc ( Main * bmain,
bPose * pose )

◆ BKE_pose_tag_update_constraint_flags()

void BKE_pose_tag_update_constraint_flags ( bPose * pose)

Tag constraint flags for update.

Definition at line 1766 of file blenkernel/intern/action.cc.

References bPose::flag, and POSE_CONSTRAINTS_NEED_UPDATE_FLAGS.

Referenced by blender::ed::object::constraint_tag_update().

◆ BKE_pose_update_constraint_flags()

◆ get_active_actiongroup()

bActionGroup * get_active_actiongroup ( bAction * act)

Get the active action-group for an Action.

Note
This function supports both legacy and layered Actions.

Definition at line 816 of file blenkernel/intern/action.cc.

References AGRP_ACTIVE, and blender::animrig::legacy::channel_groups_all().

◆ pose_channel_in_IK_chain()

◆ pose_channels_remove_internal_links()

static void pose_channels_remove_internal_links ( Object * ob,
bPoseChannel * unlinked_pchan )
static

Definition at line 1440 of file blenkernel/intern/action.cc.

References bPose::chanbase, LISTBASE_FOREACH, and Object::pose.

Referenced by BKE_pose_channels_remove().

◆ set_active_action_group()

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

Make the given Action-Group the active one.

Note
This function supports both legacy and layered Actions.

Definition at line 828 of file blenkernel/intern/action.cc.

References AGRP_ACTIVE, blender::animrig::legacy::channel_groups_all(), bActionGroup::flag, and select().

◆ what_does_obaction()

Variable Documentation

◆ IDType_ID_AC

IDTypeInfo IDType_ID_AC

Definition at line 767 of file blenkernel/intern/action.cc.

Referenced by id_type_init().

◆ LOG

CLG_LogRef LOG = {"bke.action"}
static

Definition at line 77 of file blenkernel/intern/action.cc.

Referenced by BKE_pose_copy_result().