|
Blender V5.0
|
Blender kernel action and pose functionality. More...
Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::animrig |
| namespace | blender::bke |
Typedefs | |
| using | blender::bke::FoundFCurveCallback = blender::FunctionRef<void(FCurve *fcurve, const char *bone_name)> |
| using | blender::bke::FoundFCurveCallbackConst |
Blender kernel action and pose functionality.
Definition in file BKE_action.hh.
| void action_group_colors_set | ( | bActionGroup * | grp, |
| const BoneColor * | color ) |
Set colors used on this action group.
Definition at line 860 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 848 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_legacy(), 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 818 of file blenkernel/intern/action.cc.
References ThemeWireColor::active, bActionGroup::cs, bActionGroup::customCol, rgba_uchar_args_set(), ThemeWireColor::select, ThemeWireColor::solid, bTheme::tarm, and U.
| void action_groups_add_channel | ( | bAction * | act, |
| bActionGroup * | agrp, | ||
| FCurve * | fcurve ) |
Add given channel into (active) group
Definition at line 903 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_legacy(), animchannels_group_channels(), and update_duplicate_action_constraint_settings().
| 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 876 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, name, offsetof, and STRNCPY_UTF8.
Referenced by blender::animrig::action_fcurve_ensure_legacy(), animchannels_group_channels(), and update_duplicate_action_constraint_settings().
| void action_groups_clear_tempflags | ( | bAction * | act | ) |
Clear all 'temp' flags on all groups.
Definition at line 1078 of file blenkernel/intern/action.cc.
References AGRP_TEMP, and blender::animrig::legacy::channel_groups_all().
Remove the given channel from all groups.
Definition at line 1022 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_containers(), animchannels_group_channels(), animchannels_ungroup_exec(), blender::animrig::animdata_fcurve_delete(), BKE_action_fcurves_clear(), and ED_curve_updateAnimPaths().
Definition at line 779 of file blenkernel/intern/action.cc.
References BKE_id_new(), and name.
Referenced by blender::animrig::action_add(), action_create_new(), blender::animrig::convert_to_layered_action(), and blender::animrig::id_action_ensure().
| void BKE_action_fcurves_clear | ( | bAction * | act | ) |
Remove all fcurves from the action.
Definition at line 2229 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.
| void void void void void BKE_action_flip_with_pose | ( | bAction * | act, |
| blender::Span< Object * > | objects ) |
Flip the action so it can be applied as a mirror. Only data of slots that are related to the given objects is mirrored.
Definition at line 456 of file action_mirror.cc.
References action_flip_pchan(), action_flip_pchan_rna_paths(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_fcurve_pathcache_create(), BKE_fcurve_pathcache_destroy(), DEG_id_tag_update(), blender::animrig::fcurves_for_action_slot(), blender::animrig::generic_slot_for_autoassign(), ActionSlot::handle, bAction::id, ID_RECALC_SYNC_TO_EVAL, LISTBASE_FOREACH, blender::animrig::Action::slot(), and bAction::slot_array_num.
Referenced by flip_pose().
| bActionGroup * BKE_action_group_find_name | ( | bAction * | act, |
| const char | name[] ) |
Find a group with the given name.
Definition at line 1064 of file blenkernel/intern/action.cc.
References BLI_assert, BLI_findstring(), ELEM, ListBase::first, bAction::groups, name, and offsetof.
Referenced by blender::animrig::action_fcurve_ensure_legacy(), animviz_calc_motionpaths(), update_duplicate_action_constraint_settings(), 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 973 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 1804 of file blenkernel/intern/action.cc.
References bPose::active_group, bPose::agroups, BLI_addtail(), BLI_listbase_count(), BLI_uniquename(), DATA_, MEM_callocN(), bActionGroup::name, name, offsetof, and STRNCPY_UTF8.
| void void void void BKE_pose_blend_read_after_liblink | ( | BlendLibReader * | reader, |
| Object * | ob, | ||
| bPose * | pose ) |
Referenced by object_blend_read_after_liblink().
| void void void BKE_pose_blend_read_data | ( | BlendDataReader * | reader, |
| ID * | id_owner, | ||
| bPose * | pose ) |
Referenced by object_blend_read_data().
| void void BKE_pose_blend_write | ( | BlendWriter * | writer, |
| bPose * | pose ) |
Referenced by object_blend_write().
| 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 1178 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(), blender::ed::transform::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 1197 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::transform::calc_orientation_from_type_ex(), blender::ed::object::constraint_active_list(), blender::ed::object::constraint_add_exec(), blender::ed::object::get_new_constraint_target(), blender::ed::transform::getTransformOrientation_ex(), blender::ed::object::parent_set_with_depsgraph(), 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 1202 of file blenkernel/intern/action.cc.
References BKE_pose_channel_active_if_bonecoll_visible(), bPoseChannel::bone, blender::animrig::bone_is_selected(), bPose::chanbase, Object::data, ELEM, LISTBASE_FOREACH, 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 1658 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, bPoseChannel::stiffness, and bPoseChannel::system_properties.
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 1106 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, name, OB_LOCK_ROT4D, bPoseChannel::protectflag, bPoseChannel::quat, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::scale, bPoseChannel::scale_in, bPoseChannel::scale_out, bPoseChannel::stiffness, STRNCPY_UTF8, unit_axis_angle(), unit_m4(), unit_qt(), and zero_v3().
Referenced by actcon_get_tarmat(), armature_symmetrize_exec(), copy_pchan(), rebuild_pose_bone(), update_duplicate_constraint_settings(), update_duplicate_custom_bone_shapes(), and update_duplicate_subtarget().
| 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 1092 of file blenkernel/intern/action.cc.
References BLI_findstring(), BLI_ghash_lookup(), bPose::chanbase, bPose::chanhash, ELEM, name, and offsetof.
Referenced by action_flip_pchan(), add_verts_to_dgroups(), animchan_sync_group(), apply_armature_pose2bones_exec(), applyarmature_process_selected_recursive(), armdef_evaluate(), armdef_get_tarmat(), BKE_camera_object_dof_distance(), BKE_constraint_apply_for_pose(), 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_collection_select(), 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(), blender::bke::tests::ArmatureDeformTestBase::create_test_armature_object(), 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(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::ensure_active_vertex_group_in_object(), blender::io::fbx::ArmatureImportContext::find_armatures(), blender::bke::get_armature_deform_params(), blender::ed::greasepencil::get_bone_mat(), blender::deg::BoneComponentNode::init(), initialize(), is_animating_bone(), 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(), blender::animrig::pose_bone_descendent_iterator(), pose_bone_do_paste(), pose_channel_find_bone(), pose_channel_in_IK_chain(), pose_clear_transform_generic_exec(), blender::animrig::pose_depth_iterator_recursive(), pose_foreachScreenBone(), blender::ed::transform::pose_grab_with_ik_children(), pose_select_constraint_target_exec(), pose_select_same_keyingset(), poselib_keytag_pose(), post_edit_bone_duplicate(), blender::ed::sculpt_paint::greasepencil::process_stroke_weights(), rebuild_pose_bone(), select_pchan_for_action_group(), select_similar_data_pchan(), blender::io::usd::set_rest_pose(), skip_fcurve_selected_data(), snap_sel_to_grid_exec(), 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(), update_depsgraph(), update_duplicate_action_constraint_settings(), update_duplicate_subtarget(), update_duplicate_transform_constraint_settings(), and view3d_viewmatrix_set().
| void BKE_pose_channel_free | ( | bPoseChannel * | pchan | ) |
Definition at line 1595 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 1585 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 1536 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, bPoseChannel::runtime, and bPoseChannel::system_properties.
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 1225 of file blenkernel/intern/action.cc.
References BKE_pose_channel_find_name(), BLI_string_flip_side_name(), MAXBONENAME, name, and STREQ.
Referenced by blender::ed::transform::createTransPose(), pchan_clear_loc_with_mirrored(), pchan_clear_rot_with_mirrored(), pchan_clear_scale_with_mirrored(), pose_select_mirror_exec(), and blender::ed::transform::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 1396 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 1580 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 1568 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 1573 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 1087 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_channel_transform_location | ( | const bArmature * | arm, |
| const bPoseChannel * | pose_bone, | ||
| float | r_pose_space_pivot[3] ) |
Get the transform location, accounting for POSE_TRANSFORM_AT_CUSTOM_TX.
Definition at line 1429 of file blenkernel/intern/action.cc.
References copy_v3_v3(), bPoseChannel::custom_tx, bPoseChannel::pose_mat, and transform_follows_custom_tx().
Referenced by blender::ed::transform::add_pose_transdata(), blender::ed::object::calc_active_center_for_posemode(), and blender::ed::transform::gizmo_3d_foreach_selected().
| void BKE_pose_channel_transform_orientation | ( | const bArmature * | arm, |
| const bPoseChannel * | pose_bone, | ||
| float | r_pose_orientation[3][3] ) |
Get the transform pose orientation, accounting for POSE_TRANSFORM_AT_CUSTOM_TX.
Definition at line 1414 of file blenkernel/intern/action.cc.
References BLI_assert, copy_m3_m4(), bPoseChannel::custom_tx, bPoseChannel::pose_mat, and transform_follows_custom_tx().
Referenced by blender::ed::transform::add_pose_transdata(), and blender::ed::transform::getTransformOrientation_ex().
| void BKE_pose_channels_free | ( | bPose * | pose | ) |
Definition at line 1615 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 1600 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 1441 of file blenkernel/intern/action.cc.
References BLI_ghash_insert(), BLI_ghash_str_new(), bPose::chanbase, bPose::chanhash, and LISTBASE_FOREACH.
Referenced by add_verts_to_dgroups(), BKE_object_handle_update_ex(), BKE_pose_copy_data_ex(), BKE_pose_rebuild(), blender::deg::DepsgraphNodeBuilder::build_rig(), blender::animrig::pose_bone_descendent_depth_iterator(), blender::animrig::pose_bone_descendent_iterator(), post_edit_bone_duplicate(), and what_does_obaction().
| void BKE_pose_channels_hash_free | ( | bPose * | pose | ) |
Definition at line 1451 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(), post_edit_bone_duplicate(), and separate_armature_bones().
| bool BKE_pose_channels_is_valid | ( | const bPose * | pose | ) |
Definition at line 1157 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 ) |
Selectively remove pose channels.
References ATTR_WARN_UNUSED_RESULT, flag, and name.
Referenced by armature_delete_selected_exec(), and armature_dissolve_selected_exec().
| void BKE_pose_check_uids_unique_and_report | ( | const bPose * | pose | ) |
Definition at line 2064 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 1334 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 1251 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 void BKE_pose_copy_pchan_result | ( | bPoseChannel * | pchanto, |
| const bPoseChannel * | pchanfrom ) |
Both poses should be in sync.
Definition at line 1934 of file blenkernel/intern/action.cc.
References BKE_pose_channel_find_name(), BKE_pose_copy_pchan_result(), bPose::chanbase, CLOG_ERROR, LISTBASE_FOREACH, and LOG.
| void BKE_pose_free | ( | bPose * | pose | ) |
Definition at line 1653 of file blenkernel/intern/action.cc.
References BKE_pose_free_ex().
| void BKE_pose_free_data | ( | bPose * | pose | ) |
Definition at line 1639 of file blenkernel/intern/action.cc.
References BKE_pose_free_data_ex().
Referenced by actcon_get_tarmat().
| void void BKE_pose_free_data_ex | ( | bPose * | pose, |
| bool | do_id_user ) |
Definition at line 1620 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 1644 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 1238 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 1356 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 1173 of file blenkernel/intern/action.cc.
References ANIM_bone_in_visible_collection(), and bPoseChannel::bone.
Referenced by blender::ed::transform::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 1339 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 1822 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().
| 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 1859 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 1872 of file blenkernel/intern/action.cc.
References bPose::chanbase, copy_v3_fl(), bPose::cyclic_offset, LISTBASE_FOREACH, POSE_BBONE_SHAPE, POSE_LOC, POSE_ROT, POSE_SCALE, POSE_SELECTED, bPose::stride_offset, unit_axis_angle(), unit_qt(), and zero_v3().
Referenced by pose_clear_user_transforms_exec().
Tag pose for recalculation. Also tag all related data to be recalculated.
Referenced by armature_delete_selected_exec(), BKE_object_duplicate(), blo_do_versions_pre250(), blender::ed::object::constraint_add_exec(), blender::ed::object::constraint_copy_to_selected_exec(), blender::ed::object::object_pose_tag_update(), and blender::ed::object::pose_constraint_copy_exec().
| void BKE_pose_tag_update_constraint_flags | ( | bPose * | pose | ) |
Tag constraint flags for update.
Definition at line 1797 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 1722 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, data, 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, POSE_CONSTRAINTS_NEED_UPDATE_FLAGS, 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 792 of file blenkernel/intern/action.cc.
References AGRP_ACTIVE, and blender::animrig::legacy::channel_groups_all().
| void set_active_action_group | ( | bAction * | act, |
| bActionGroup * | agrp, | ||
| short | select ) |
Make the given Action-Group the active one.
Definition at line 804 of file blenkernel/intern/action.cc.
References AGRP_ACTIVE, blender::animrig::legacy::channel_groups_all(), and select.
| void what_does_obaction | ( | Object * | ob, |
| Object * | workob, | ||
| bPose * | pose, | ||
| bAction * | act, | ||
| int32_t | action_slot_handle, | ||
| char | groupname[], | ||
| const AnimationEvalContext * | anim_eval_context ) |
For the calculation of the effects of an Action at the given frame on an object This is currently only used for the Action Constraint
Referenced by actcon_get_tarmat().