|
Blender V4.3
|
#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 |
Variables | |
| static CLG_LogRef | LOG = {"bke.action"} |
| static AssetTypeInfo | blender::bke::AssetType_AC |
| IDTypeInfo | IDType_ID_AC |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 18 of file blenkernel/intern/action.cc.
| void action_group_colors_set | ( | bActionGroup * | grp, |
| const BoneColor * | color ) |
Set colors used on this action group.
Definition at line 884 of file blenkernel/intern/action.cc.
References bActionGroup::cs, bActionGroup::customCol, blender::animrig::BoneColor::effective_color(), and BoneColor::palette_index.
Referenced by 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().
| 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.
| void action_groups_add_channel | ( | bAction * | act, |
| bActionGroup * | agrp, | ||
| FCurve * | fcurve ) |
Add given channel into (active) group
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().
| bActionGroup * action_groups_add_new | ( | bAction * | act, |
| const char | name[] ) |
Add a new action group with the given name to the action>
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().
| void action_groups_clear_tempflags | ( | bAction * | act | ) |
Clear all 'temp' flags on all groups.
Definition at line 1102 of file blenkernel/intern/action.cc.
References blender::animrig::legacy::channel_groups_all(), and bActionGroup::flag.
Remove the given channel from all groups.
Definition at line 1046 of file blenkernel/intern/action.cc.
References BLI_assert, BLI_listbase_clear(), BLI_remlink(), bActionGroup::channels, bAction::curves, ELEM, ListBase::first, FCurve::grp, ListBase::last, FCurve::next, and FCurve::prev.
Referenced by animchannels_delete_exec(), animchannels_group_channels(), animchannels_ungroup_exec(), blender::animrig::animdata_fcurve_delete(), BKE_action_fcurves_clear(), ED_curve_updateAnimPaths(), and remove_sequencer_fcurves().
Definition at line 803 of file blenkernel/intern/action.cc.
References BKE_id_new(), and ID_AC.
Referenced by blender::animrig::action_add(), action_create_new(), blender::animrig::convert_to_layered_action(), do_versions_ipos_to_animato(), blender::animrig::id_action_ensure(), and ipo_to_animdata().
| void BKE_action_fcurves_clear | ( | bAction * | act | ) |
Remove all fcurves from the action.
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.
| bActionGroup * BKE_action_group_find_name | ( | bAction * | act, |
| const char | name[] ) |
Find a group with the given name.
Definition at line 1088 of file blenkernel/intern/action.cc.
References BLI_assert, BLI_findstring(), ELEM, ListBase::first, bAction::groups, and offsetof.
Referenced by blender::animrig::action_fcurve_ensure(), AnimationImporter::add_bone_fcurve(), animviz_calc_motionpaths(), fcurve_add_to_list(), updateDuplicateActionConstraintSettings(), and what_does_obaction().
| 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.
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().
| 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.
| void BKE_pose_blend_read_after_liblink | ( | BlendLibReader * | reader, |
| Object * | ob, | ||
| bPose * | pose ) |
Definition at line 2164 of file blenkernel/intern/action.cc.
References BKE_armature_find_bone_name(), BKE_pose_tag_recalc(), BLO_read_lib_get_main(), BLO_read_lib_is_undo(), bPose::chanbase, Object::data, DEG_id_tag_update_ex(), bArmature::id, Object::id, ID_IS_LINKED, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, ID::lib, LISTBASE_FOREACH, and UNLIKELY.
| void BKE_pose_blend_read_data | ( | BlendDataReader * | reader, |
| ID * | id_owner, | ||
| bPose * | pose ) |
Definition at line 2110 of file blenkernel/intern/action.cc.
References bPose::agroups, animviz_motionpath_blend_read_data(), bPoseChannel::bbone_next, bPoseChannel::bbone_prev, BKE_constraint_blend_read_data(), BKE_pose_channel_runtime_reset(), BKE_pose_channel_session_uid_generate(), BKE_pose_ikparam_get_name(), BLI_listbase_clear(), BLO_read_struct, BLO_read_struct_by_name_array(), BLO_read_struct_list, bPose::chan_array, bPose::chanbase, bPose::chanhash, bPoseChannel::child, CLAMP, bPoseChannel::custom_tx, IDP_BlendDataRead, bPose::ikdata, bPose::ikparam, LISTBASE_FOREACH, bPoseChannel::parent, ROT_MODE_MAX, and ROT_MODE_MIN.
| void BKE_pose_blend_write | ( | BlendWriter * | writer, |
| bPose * | pose, | ||
| bArmature * | arm ) |
Definition at line 2061 of file blenkernel/intern/action.cc.
References bPose::agroups, animviz_motionpath_blend_write(), BKE_armature_find_bone_name(), BKE_constraint_blend_write(), BKE_pose_ikparam_get_name(), BLI_assert, BLO_write_struct, BLO_write_struct_by_name(), BONE_SELECTED, bPose::chanbase, Bone::flag, bPose::flag, IDP_BlendWrite(), bPose::ikparam, LISTBASE_FOREACH, and POSE_RECALC.
| bPoseChannel * BKE_pose_channel_active | ( | Object * | ob, |
| bool | check_bonecoll ) |
Find the active pose-channel for an object
| check_bonecoll | checks if the bone is on a visible bone collection (this might be skipped (e.g. for "Show Active" from the Outliner). |
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().
| bPoseChannel * BKE_pose_channel_active_if_bonecoll_visible | ( | Object * | ob | ) |
Find the active pose-channel for an object if it is on a visible bone collection (calls BKE_pose_channel_active with check_bonecoll set to true)
Definition at line 1221 of file blenkernel/intern/action.cc.
References BKE_pose_channel_active().
Referenced by blender::ed::object::add_hook_object(), BKE_pose_channel_active_or_first_selected(), blender::ed::object::calc_active_center_for_posemode(), blender::ed::object::constraint_active_list(), blender::ed::object::constraint_add_exec(), ED_transform_calc_orientation_from_type_ex(), blender::ed::object::get_new_constraint_target(), getTransformOrientation_ex(), blender::ed::object::parent_set(), blender::ed::object::pose_ik_add_invoke(), pose_select_hierarchy_exec(), screen_ctx_active_pose_bone(), v3d_posearmature_buts(), view_lock_to_active_exec(), WIDGETGROUP_armature_spline_poll(), WIDGETGROUP_armature_spline_refresh(), and WIDGETGROUP_armature_spline_setup().
| 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().
| void BKE_pose_channel_copy_data | ( | bPoseChannel * | pchan, |
| const bPoseChannel * | pchan_from ) |
Copy the internal members of each pose channel including constraints and ID-Props, used when duplicating bones in edit-mode. (unlike copy_pose_channel_data which only does posing-related stuff).
Definition at line 1635 of file blenkernel/intern/action.cc.
References ThemeWireColor::active, bPoseChannel::agrp_index, bPoseChannel::bbone_next, bPoseChannel::bbone_prev, BKE_constraints_copy(), bPoseChannel::color, bPoseChannel::constraints, copy_v3_v3(), copy_v4_v4_uchar(), BoneColor::custom, bPoseChannel::custom, bPoseChannel::custom_rotation_euler, bPoseChannel::custom_scale_xyz, bPoseChannel::custom_shape_wire_width, bPoseChannel::custom_translation, bPoseChannel::drawflag, ThemeWireColor::flag, Object::id, id_us_plus(), IDP_CopyProperty(), IDP_FreeProperty(), bPoseChannel::ikflag, bPoseChannel::iklinweight, bPoseChannel::ikrotweight, bPoseChannel::ikstretch, bPoseChannel::limitmax, bPoseChannel::limitmin, BoneColor::palette_index, bPoseChannel::prop, bPoseChannel::protectflag, bPoseChannel::rotmode, ThemeWireColor::select, ThemeWireColor::solid, and bPoseChannel::stiffness.
Referenced by copy_pchan().
| bPoseChannel * BKE_pose_channel_ensure | ( | bPose * | pose, |
| const char * | name ) |
Looks to see if the channel with the given name already exists in this pose - if not a new one is allocated and initialized.
Definition at line 1130 of file blenkernel/intern/action.cc.
References BKE_pose_channel_find_name(), BKE_pose_channel_session_uid_generate(), BLI_addtail(), BLI_ghash_insert(), bPose::chanbase, bPose::chanhash, bPoseChannel::constinv, copy_v3_fl(), bPoseChannel::custom_rotation_euler, bPoseChannel::custom_scale_xyz, bPoseChannel::custom_shape_wire_width, bPoseChannel::custom_translation, bPoseChannel::iklinweight, bPoseChannel::ikrotweight, bPoseChannel::limitmax, bPoseChannel::limitmin, M_PI, MEM_callocN, bPoseChannel::name, OB_LOCK_ROT4D, bPoseChannel::protectflag, bPoseChannel::quat, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::scale_in, bPoseChannel::scale_out, bPoseChannel::size, bPoseChannel::stiffness, STRNCPY, unit_axis_angle(), unit_m4(), unit_qt(), and zero_v3().
Referenced by actcon_get_tarmat(), armature_symmetrize_exec(), copy_pchan(), rebuild_pose_bone(), updateDuplicateConstraintSettings(), updateDuplicateCustomBoneShapes(), and updateDuplicateSubtarget().
| 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().
| void BKE_pose_channel_free | ( | bPoseChannel * | pchan | ) |
Definition at line 1572 of file blenkernel/intern/action.cc.
References BKE_pose_channel_free_ex().
Referenced by armature_symmetrize_exec(), BKE_pose_channels_remove(), and separate_armature_bones().
| void BKE_pose_channel_free_bbone_cache | ( | bPoseChannel_Runtime * | runtime | ) |
Deallocates runtime cache of a pose channel's B-Bone shape.
Definition at line 1562 of file blenkernel/intern/action.cc.
References bPoseChannel_Runtime::bbone_deform_mats, bPoseChannel_Runtime::bbone_dual_quats, bPoseChannel_Runtime::bbone_pose_mats, bPoseChannel_Runtime::bbone_rest_mats, bPoseChannel_Runtime::bbone_segment_boundaries, bPoseChannel_Runtime::bbone_segments, and MEM_SAFE_FREE.
Referenced by allocate_bbone_cache(), BKE_pchan_bbone_segments_cache_copy(), BKE_pose_bone_done(), BKE_pose_channel_runtime_free(), and BKE_pose_eval_init().
| void BKE_pose_channel_free_ex | ( | bPoseChannel * | pchan, |
| bool | do_id_user ) |
Deallocates a pose channel. Does not free the pose channel itself.
Definition at line 1517 of file blenkernel/intern/action.cc.
References animviz_free_motionpath(), BKE_constraints_free_ex(), BKE_pose_channel_runtime_free(), bPoseChannel::constraints, bPoseChannel::custom, bPoseChannel::draw_data, Object::id, id_us_min(), IDP_FreeProperty_ex(), MEM_SAFE_FREE, bPoseChannel::mpath, bPoseChannel::prop, and bPoseChannel::runtime.
Referenced by BKE_pose_channel_free(), BKE_pose_channels_clear_with_null_bone(), and BKE_pose_channels_free_ex().
| bPoseChannel * BKE_pose_channel_get_mirrored | ( | const bPose * | pose, |
| const char * | name ) |
Definition at line 1249 of file blenkernel/intern/action.cc.
References BKE_pose_channel_find_name(), BLI_string_flip_side_name(), MAXBONENAME, and STREQ.
Referenced by createTransPose(), pchan_clear_loc_with_mirrored(), pchan_clear_rot_with_mirrored(), pchan_clear_scale_with_mirrored(), pose_select_mirror_exec(), and pose_transform_mirror_update().
| 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().
| 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().
| 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().
| 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().
| void BKE_pose_channel_session_uid_generate | ( | bPoseChannel * | pchan | ) |
Definition at line 1111 of file blenkernel/intern/action.cc.
References BLI_session_uid_generate(), bPoseChannel::runtime, and bPoseChannel_Runtime::session_uid.
Referenced by BKE_pose_blend_read_data(), BKE_pose_channel_ensure(), and BKE_pose_copy_data_ex().
| void BKE_pose_channels_free | ( | bPose * | pose | ) |
Definition at line 1592 of file blenkernel/intern/action.cc.
References 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().
| void BKE_pose_channels_hash_ensure | ( | bPose * | pose | ) |
Removes the hash for quick lookup of channels, must be done when adding/removing channels.
Definition at line 1422 of file blenkernel/intern/action.cc.
References BLI_ghash_insert(), BLI_ghash_str_new(), bPose::chanbase, bPose::chanhash, and LISTBASE_FOREACH.
Referenced by BKE_object_handle_update_ex(), BKE_pose_copy_data_ex(), BKE_pose_rebuild(), blender::deg::DepsgraphNodeBuilder::build_rig(), postEditBoneDuplicate(), and what_does_obaction().
| void BKE_pose_channels_hash_free | ( | bPose * | pose | ) |
Definition at line 1432 of file blenkernel/intern/action.cc.
References BLI_ghash_free(), and bPose::chanhash.
Referenced by BKE_pose_channels_clear_with_null_bone(), BKE_pose_channels_free_ex(), ED_armature_join_objects_exec(), postEditBoneDuplicate(), and separate_armature_bones().
| bool BKE_pose_channels_is_valid | ( | const bPose * | pose | ) |
Definition at line 1181 of file blenkernel/intern/action.cc.
References BLI_ghash_lookup(), bPose::chanbase, bPose::chanhash, ListBase::first, bPoseChannel::name, and bPoseChannel::next.
Referenced by ED_armature_bone_rename().
| void BKE_pose_channels_remove | ( | Object * | ob, |
| bool(* | filter_fn )(const char *bone_name, void *user_data), | ||
| void * | user_data ) |
Definition at line 1455 of file blenkernel/intern/action.cc.
References bPoseChannel::bbone_next, bPoseChannel::bbone_prev, BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BKE_pose_channel_free(), BLI_freelinkN(), BLI_ghash_remove(), bPose::chanbase, bPose::chanhash, CONSTRAINT_DISABLE, bPoseChannel::constraints, bPoseChannel::custom_tx, ListBase::first, LISTBASE_FOREACH, bPoseChannel::name, bPoseChannel::next, Object::pose, and pose_channels_remove_internal_links().
| void BKE_pose_check_uids_unique_and_report | ( | const bPose * | pose | ) |
Definition at line 2034 of file blenkernel/intern/action.cc.
References BLI_gset_free(), BLI_gset_insert(), BLI_gset_lookup(), BLI_gset_new(), BLI_session_uid_ghash_compare(), BLI_session_uid_ghash_hash(), BLI_session_uid_is_generated(), bPose::chanbase, LISTBASE_FOREACH, and printf.
Referenced by BKE_object_check_uids_unique_and_report().
Definition at line 1355 of file blenkernel/intern/action.cc.
References BKE_pose_copy_data_ex().
Referenced by pose_clear_user_transforms_exec().
Allocate a new pose on the heap, and copy the src pose and its channels into the new pose. *dst is set to the newly allocated structure, and assumed to be NULL.
| dst | Should be freed already, makes entire duplicate. |
Definition at line 1275 of file blenkernel/intern/action.cc.
References bPose::agroups, animviz_copy_motionpath(), bPose::avs, BKE_constraints_copy_ex(), BKE_pose_channel_find_name(), BKE_pose_channel_runtime_reset_on_copy(), BKE_pose_channel_session_uid_generate(), BKE_pose_channels_hash_ensure(), BLI_duplicatelist(), bPose::chanbase, bPose::chanhash, ListBase::first, flag, id_us_plus(), IDP_CopyProperty_ex(), bPose::ikdata, bPose::ikparam, bPose::iksolver, ListBase::last, LIB_ID_CREATE_NO_MAIN, LIB_ID_CREATE_NO_USER_REFCOUNT, LISTBASE_FOREACH, MEM_callocN, and MEM_dupallocN.
Referenced by BKE_pose_copy_data(), and copy_object_pose().
| void BKE_pose_copy_pchan_result | ( | bPoseChannel * | pchanto, |
| const bPoseChannel * | pchanfrom ) |
Definition at line 1873 of file blenkernel/intern/action.cc.
References bPoseChannel::chan_mat, copy_m4_m4(), copy_qt_qt(), copy_v3_v3(), bPoseChannel::curve_in_x, bPoseChannel::curve_in_z, bPoseChannel::curve_out_x, bPoseChannel::curve_out_z, bPoseChannel::ease1, bPoseChannel::ease2, bPoseChannel::eul, bPoseChannel::flag, bPoseChannel::loc, bPoseChannel::pose_head, bPoseChannel::pose_mat, bPoseChannel::pose_tail, bPoseChannel::protectflag, bPoseChannel::quat, bPoseChannel::roll1, bPoseChannel::roll2, bPoseChannel::rotmode, bPoseChannel::scale_in, bPoseChannel::scale_out, and bPoseChannel::size.
Referenced by BKE_pose_copy_result().
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.
| void BKE_pose_free | ( | bPose * | pose | ) |
Definition at line 1630 of file blenkernel/intern/action.cc.
References BKE_pose_free_ex().
| 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().
| void BKE_pose_free_data_ex | ( | bPose * | pose, |
| bool | do_id_user ) |
Definition at line 1597 of file blenkernel/intern/action.cc.
References bPose::agroups, BIK_clear_data(), BKE_pose_channels_free_ex(), BLI_freelistN(), ListBase::first, bPose::ikparam, and MEM_freeN().
Referenced by BKE_pose_free_data(), and 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().
| 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().
| 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.
| bool BKE_pose_is_bonecoll_visible | ( | const bArmature * | arm, |
| const bPoseChannel * | pchan ) |
Checks if the bone is on a visible bone collection
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().
| void BKE_pose_itasc_init | ( | bItasc * | itasc | ) |
Initialize a bItasc structure with default value.
Definition at line 1360 of file blenkernel/intern/action.cc.
References bItasc::dampeps, bItasc::dampmax, bItasc::feedback, bItasc::flag, bItasc::iksolver, IKSOLVER_ITASC, ITASC_AUTO_STEP, ITASC_INITIAL_REITERATION, ITASC_SOLVER_SDLS, bItasc::maxstep, bItasc::maxvel, bItasc::minstep, bItasc::numiter, bItasc::numstep, bItasc::precision, and bItasc::solver.
Referenced by BKE_pose_ikparam_init(), and get_ikdata().
| 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().
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().
| 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().
Definition at line 1926 of file blenkernel/intern/action.cc.
References DEG_relations_tag_update(), bPose::flag, and POSE_RECALC.
Referenced by BKE_pose_blend_read_after_liblink().
| 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().
| void BKE_pose_update_constraint_flags | ( | bPose * | pose | ) |
Checks for IK constraint, Spline IK, and also for Follow-Path constraint. can do more constraints flags later. pose should be entirely OK.
Definition at line 1691 of file blenkernel/intern/action.cc.
References bPoseChannel::bone, BONE_CONNECTED, bPose::chanbase, bPoseChannel::constflag, CONSTRAINT_IK_TIP, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK, Bone::flag, bPose::flag, LISTBASE_FOREACH, OB_ARMATURE, OB_CURVES_LEGACY, bPoseChannel::parent, PCHAN_HAS_CONST, PCHAN_HAS_IK, PCHAN_HAS_NO_TARGET, PCHAN_HAS_SPLINEIK, PCHAN_INFLUENCED_BY_IK, and POSE_CONSTRAINTS_TIMEDEPEND.
Referenced by BKE_object_handle_update_ex(), BKE_pose_rebuild(), blender::deg::DepsgraphNodeBuilder::build_rig(), blender::ed::object::constraint_add_exec(), blender::ed::object::constraint_update(), and what_does_obaction().
| bActionGroup * get_active_actiongroup | ( | bAction * | act | ) |
Get the active action-group for an Action.
Definition at line 816 of file blenkernel/intern/action.cc.
References AGRP_ACTIVE, and blender::animrig::legacy::channel_groups_all().
|
static |
Definition at line 1394 of file blenkernel/intern/action.cc.
References BKE_pose_channel_find_name(), bPoseChannel::bone, Bone::childbase, CONSTRAINT_IK_AUTO, CONSTRAINT_TYPE_KINEMATIC, bPoseChannel::constraints, LISTBASE_FOREACH, Object::pose, and pose_channel_in_IK_chain().
Referenced by BKE_pose_channel_in_IK_chain(), and pose_channel_in_IK_chain().
|
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().
| void set_active_action_group | ( | bAction * | act, |
| bActionGroup * | agrp, | ||
| short | select ) |
Make the given Action-Group the active one.
Definition at line 828 of file blenkernel/intern/action.cc.
References AGRP_ACTIVE, blender::animrig::legacy::channel_groups_all(), bActionGroup::flag, and select().
| 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 ) |
Definition at line 1935 of file blenkernel/intern/action.cc.
References AnimData::action, Object::adt, ADT_RECALC_ANIM, animsys_evaluate_action_group(), BKE_action_group_find_name(), BKE_animdata_action_ensure_idroot(), BKE_animsys_evaluate_animdata(), BKE_object_workob_clear(), BKE_pose_channels_hash_ensure(), BKE_pose_update_constraint_flags(), BLI_assert, bPose::chanbase, blender::animrig::ChannelBag::channel_group_find(), Object::constinv, Object::constraints, copy_m4_m4(), ListBase::first, bPose::flag, Object::id, blender::animrig::Action::is_action_layered(), ListBase::last, ID::name, Object::par1, Object::par2, Object::par3, Object::parent, Object::parentinv, Object::parsubstr, Object::partype, Object::pose, POSE_CONSTRAINTS_NEED_UPDATE_FLAGS, RNA_id_pointer_create(), Object::rotmode, Object::runtime, AnimData::slot_handle, STRNCPY, Object::trackflag, and Object::upflag.
| IDTypeInfo IDType_ID_AC |
Definition at line 767 of file blenkernel/intern/action.cc.
Referenced by id_type_init().
|
static |
Definition at line 77 of file blenkernel/intern/action.cc.
Referenced by BKE_pose_copy_result().