|
Blender V4.3
|
#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 "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_string_utils.hh"#include "BKE_action.hh"#include "BKE_animsys.h"#include "BKE_appdir.hh"#include "BKE_armature.hh"#include "BKE_blender_copybuffer.hh"#include "BKE_blendfile.hh"#include "BKE_context.hh"#include "BKE_idprop.hh"#include "BKE_layer.hh"#include "BKE_lib_query.hh"#include "BKE_main.hh"#include "BKE_object.hh"#include "BKE_report.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_armature.hh"#include "ED_keyframing.hh"#include "ED_screen.hh"#include "ANIM_bone_collections.hh"#include "ANIM_keyframing.hh"#include "ANIM_keyingsets.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "armature_intern.hh"Go to the source code of this file.
Classes | |
| struct | ApplyArmature_ParentState |
|
static |
Definition at line 387 of file pose_transform.cc.
References AnimData::action, Object::adt, applyarmature_fix_boneparents(), applyarmature_process_selected_recursive(), applyarmature_reset_constraints(), applyarmature_set_edit_position(), applyarmature_transfer_properties(), BKE_armature_from_object(), BKE_object_obdata_is_libdata(), BKE_object_pose_armature_get(), BKE_pose_channel_find_name(), BKE_pose_where_is(), BKE_report(), bArmature::bonebase, bPose::chanbase, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_selected_pose_bones(), DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, ED_armature_ebone_find_name(), ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), bArmature::edbo, Object::id, ID_RECALC_SYNC_TO_EVAL, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), LISTBASE_FOREACH, NC_OBJECT, ND_POSE, OB_ARMATURE, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, bPoseChannel::pose_mat, bPoseChannel::pose_tail, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, RPT_WARNING, Object::type, and WM_event_add_notifier().
Referenced by POSE_OT_armature_apply().
|
static |
Definition at line 472 of file pose_transform.cc.
References CTX_wm_manager(), wmWindowManager::id, wmOperator::layout, wmOperator::properties, ptr, RNA_pointer_create(), wmOperatorType::srna, wmOperator::type, UI_ITEM_NONE, and uiItemR().
Referenced by POSE_OT_armature_apply().
|
static |
Definition at line 180 of file pose_transform.cc.
References applyarmature_set_edit_position(), ED_armature_ebone_find_name(), bArmature::edbo, EditBone::head, mul_m4_m4m3(), mul_v3_m4v3(), bPoseChannel::name, EditBone::roll, sub_v3_v3v3(), EditBone::tail, and vec_roll_to_mat3().
Referenced by applyarmature_process_selected_recursive().
|
static |
Definition at line 77 of file pose_transform.cc.
References BKE_object_apply_mat4(), BKE_object_calc_parent(), CTX_data_depsgraph_pointer(), CTX_data_main(), depsgraph, ListBase::first, invert_m4_m4(), Main::objects, PARBONE, and ptr.
Referenced by apply_armature_pose2bones_exec().
|
static |
Definition at line 211 of file pose_transform.cc.
References applyarmature_adjust_edit_position(), applyarmature_process_selected_recursive(), applyarmature_set_edit_position(), applyarmature_transfer_properties(), Bone::arm_mat, BKE_bone_offset_matrix_get(), BKE_bone_parent_transform_apply(), BKE_bone_parent_transform_calc_from_matrices(), BKE_bone_parent_transform_clear(), BKE_bone_parent_transform_combine(), BKE_bone_parent_transform_invert(), BKE_pose_channel_find_name(), ApplyArmature_ParentState::bone, BONE_CONNECTED, Bone::childbase, copy_v3_fl3(), ED_armature_ebone_find_name(), bArmature::edbo, Bone::flag, float, Bone::inherit_scale_mode, invert_m4(), invert_m4_m4(), is_zero_v3(), Bone::length, LISTBASE_FOREACH, bPoseChannel::loc, BoneParentTransform::loc_mat, mul_m4_m4m4(), mul_m4_v3(), mul_v3_mat3_m4v3(), Bone::name, bPoseChannel::name, ApplyArmature_ParentState::new_arm_mat, ApplyArmature_ParentState::new_rest_mat, Bone::parent, bPoseChannel::parent, bPoseChannel::pose_mat, ptr, and unit_m4().
Referenced by apply_armature_pose2bones_exec(), and applyarmature_process_selected_recursive().
|
static |
Definition at line 347 of file pose_transform.cc.
References CONSTRAINT_TYPE_STRETCHTO, bConstraint::data, bStretchToConstraint::orglength, and bConstraint::type.
Referenced by applyarmature_reset_bone_constraints().
|
static |
Definition at line 366 of file pose_transform.cc.
References applyarmature_reset_bone_constraint(), bPoseChannel::constraints, and LISTBASE_FOREACH.
Referenced by applyarmature_reset_constraints().
|
static |
Definition at line 375 of file pose_transform.cc.
References applyarmature_reset_bone_constraints(), BLI_assert, BONE_SELECTED, bPose::chanbase, and LISTBASE_FOREACH.
Referenced by apply_armature_pose2bones_exec().
|
static |
Definition at line 107 of file pose_transform.cc.
References copy_m3_m4(), copy_m4_m3(), copy_v3_v3(), EditBone::head, mat3_vec_to_roll(), EditBone::roll, sub_v3_v3v3(), EditBone::tail, and vec_roll_to_mat3().
Referenced by apply_armature_pose2bones_exec(), applyarmature_adjust_edit_position(), and applyarmature_process_selected_recursive().
|
static |
Definition at line 140 of file pose_transform.cc.
References bPoseChannel::bone, copy_v3_fl(), bPoseChannel::curve_in_x, EditBone::curve_in_x, bPoseChannel::curve_in_z, EditBone::curve_in_z, bPoseChannel::curve_out_x, EditBone::curve_out_x, bPoseChannel::curve_out_z, EditBone::curve_out_z, bPoseChannel::ease1, EditBone::ease1, bPoseChannel::ease2, EditBone::ease2, bPoseChannel::eul, bPoseChannel::loc, mul_v3_v3(), bPoseChannel::quat, bPoseChannel::roll1, EditBone::roll1, bPoseChannel::roll2, EditBone::roll2, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::scale_in, EditBone::scale_in, bPoseChannel::scale_out, EditBone::scale_out, Bone::segments, bPoseChannel::size, unit_axis_angle(), unit_qt(), and zero_v3().
Referenced by apply_armature_pose2bones_exec(), and applyarmature_process_selected_recursive().
|
static |
Definition at line 989 of file pose_transform.cc.
References bPoseChannel::loc, OB_LOCK_LOCX, OB_LOCK_LOCY, OB_LOCK_LOCZ, and bPoseChannel::protectflag.
Referenced by pchan_clear_loc_with_mirrored().
|
static |
Definition at line 1003 of file pose_transform.cc.
References BKE_pose_channel_get_mirrored(), bPose::flag, bPoseChannel::name, pchan_clear_loc(), and POSE_MIRROR_EDIT.
Referenced by pchan_clear_transforms(), and pose_clear_loc_exec().
|
static |
Definition at line 1015 of file pose_transform.cc.
References axis_angle_to_eulO(), copy_v3_v3(), bPoseChannel::curve_in_x, bPoseChannel::curve_in_z, bPoseChannel::curve_out_x, bPoseChannel::curve_out_z, bPoseChannel::eul, eul_to_quat(), EULER_ORDER_DEFAULT, eulO_to_axis_angle(), IS_EQF, mul_qt_fl(), normalize_qt_qt(), OB_LOCK_ROT4D, OB_LOCK_ROTW, OB_LOCK_ROTX, OB_LOCK_ROTY, OB_LOCK_ROTZ, bPoseChannel::protectflag, bPoseChannel::quat, quat_to_eul(), bPoseChannel::roll1, bPoseChannel::roll2, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::rotmode, unit_axis_angle(), unit_qt(), and zero_v3().
Referenced by pchan_clear_rot_with_mirrored().
|
static |
Definition at line 1144 of file pose_transform.cc.
References BKE_pose_channel_get_mirrored(), bPose::flag, bPoseChannel::name, pchan_clear_rot(), and POSE_MIRROR_EDIT.
Referenced by pchan_clear_transforms(), and pose_clear_rot_exec().
|
static |
Definition at line 957 of file pose_transform.cc.
References copy_v3_fl(), bPoseChannel::ease1, bPoseChannel::ease2, OB_LOCK_SCALEX, OB_LOCK_SCALEY, OB_LOCK_SCALEZ, bPoseChannel::protectflag, bPoseChannel::scale_in, bPoseChannel::scale_out, and bPoseChannel::size.
Referenced by pchan_clear_scale_with_mirrored().
|
static |
Definition at line 977 of file pose_transform.cc.
References BKE_pose_channel_get_mirrored(), bPose::flag, bPoseChannel::name, pchan_clear_scale(), and POSE_MIRROR_EDIT.
Referenced by pchan_clear_transforms(), and pose_clear_scale_exec().
|
static |
Definition at line 1156 of file pose_transform.cc.
References pchan_clear_loc_with_mirrored(), pchan_clear_rot_with_mirrored(), and pchan_clear_scale_with_mirrored().
Referenced by pose_clear_transforms_exec().
|
static |
Perform paste pose, for a single bone.
| ob | Object where bone to paste to lives |
| chan | Bone that pose to paste comes from |
| selOnly | Only paste on selected bones |
| flip | Flip on x-axis |
Definition at line 628 of file pose_transform.cc.
References axis_angle_to_eulO(), axis_angle_to_quat(), BKE_pose_channel_find_name(), BLI_string_flip_side_name(), bPoseChannel::bone, BONE_SELECTED, 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, eul_to_quat(), EULER_ORDER_DEFAULT, eulO_to_axis_angle(), eulO_to_quat(), Bone::flag, bPoseChannel::flag, IDP_CopyProperty(), IDP_SyncGroupValues(), bPoseChannel::loc, MAXBONENAME, bPoseChannel::name, normalize_qt(), Object::pose, bPoseChannel::prop, bPoseChannel::quat, quat_to_axis_angle(), quat_to_eul(), quat_to_eulO(), bPoseChannel::roll1, bPoseChannel::roll2, ROT_MODE_AXISANGLE, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::rotmode, bPoseChannel::scale_in, bPoseChannel::scale_out, bPoseChannel::size, and STRNCPY.
Referenced by pose_clear_user_transforms_exec(), and pose_paste_exec().
|
static |
Definition at line 1299 of file pose_transform.cc.
References ANIM_KS_LOCATION_ID, pchan_clear_loc_with_mirrored(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_loc_clear().
|
static |
Definition at line 1272 of file pose_transform.cc.
References ANIM_KS_ROTATION_ID, pchan_clear_rot_with_mirrored(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_rot_clear().
|
static |
Definition at line 1245 of file pose_transform.cc.
References ANIM_KS_SCALING_ID, pchan_clear_scale_with_mirrored(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_scale_clear().
|
static |
Definition at line 1166 of file pose_transform.cc.
References ANIM_apply_keyingset(), ANIM_get_keyingset_for_autokeying(), ANIM_relative_keyingset_add_source(), blender::animrig::autokeyframe_cfra_can_key(), BKE_pose_channel_find_name(), BKE_report(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, ED_pose_recalculate_paths(), ELEM, FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN, FOREACH_PCHAN_SELECTED_IN_OBJECT_END, ID_RECALC_GEOMETRY, blender::animrig::INSERT, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), MOTIONPATH_BAKE_HAS_PATHS, NC_OBJECT, ND_TRANSFORM, OB_ARMATURE, OB_MODE_POSE, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, POSE_PATH_CALC_RANGE_FULL, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by pose_clear_loc_exec(), pose_clear_rot_exec(), pose_clear_scale_exec(), and pose_clear_transforms_exec().
|
static |
Definition at line 1326 of file pose_transform.cc.
References ANIM_KS_LOC_ROT_SCALE_ID, pchan_clear_transforms(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_transforms_clear().
|
static |
Definition at line 1354 of file pose_transform.cc.
References ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_pose_copy_data(), BKE_pose_rest(), BLI_freelistN(), bPose::chanbase, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), depsgraph, FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, ID_RECALC_GEOMETRY, IDP_FreeProperty(), LISTBASE_FOREACH, MEM_freeN(), NC_OBJECT, ND_TRANSFORM, OB_ARMATURE, OB_MODE_POSE, OPERATOR_FINISHED, pose_bone_do_paste(), wmOperator::ptr, RNA_boolean_get(), STRNCPY, and WM_event_add_notifier().
Referenced by POSE_OT_user_transforms_clear().
|
static |
Definition at line 776 of file pose_transform.cc.
References BKE_main_blendfile_path(), BKE_object_pose_armature_get(), BKE_report(), CTX_data_active_object(), CTX_data_main(), ELEM, Object::id, blender::bke::blendfile::PartialWriteContext::id_add(), OPERATOR_CANCELLED, Object::pose, wmOperator::reports, RPT_ERROR, and set_pose_keys().
Referenced by POSE_OT_copy().
|
static |
Definition at line 64 of file pose_transform.cc.
References BKE_tempdir_base(), and BLI_path_join.
Referenced by pose_paste_exec().
| void POSE_OT_armature_apply | ( | wmOperatorType * | ot | ) |
Definition at line 482 of file pose_transform.cc.
References apply_armature_pose2bones_exec(), apply_armature_pose2bones_ui(), wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and wmOperatorType::ui.
Referenced by ED_operatortypes_armature().
| void POSE_OT_copy | ( | wmOperatorType * | ot | ) |
Definition at line 818 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, and pose_copy_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_loc_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1305 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_clear_loc_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_paste | ( | wmOperatorType * | ot | ) |
Definition at line 919 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_paste_exec(), PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void POSE_OT_rot_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1278 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_clear_rot_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_scale_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1251 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_clear_scale_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_transforms_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1332 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_clear_transforms_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_user_transforms_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1414 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_clear_user_transforms_exec(), RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void POSE_OT_visual_transform_apply | ( | wmOperatorType * | ot | ) |
Definition at line 578 of file pose_transform.cc.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_visual_transform_apply_exec().
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 839 of file pose_transform.cc.
References ANIM_get_keyingset_for_autokeying(), ANIM_KS_WHOLE_CHARACTER_ID, blender::animrig::autokeyframe_pchan(), bPose::avs, BKE_copybuffer_read(), BKE_main_blendfile_path_from_global(), BKE_main_free(), BKE_main_new(), BKE_object_pose_armature_get(), BKE_report(), BLI_listbase_is_single(), bPose::chanbase, CTX_data_active_object(), CTX_DATA_COUNT, CTX_data_scene(), DEG_id_tag_update(), ED_pose_recalculate_paths(), ELEM, FILE_MAX, Main::filepath, FILTER_ID_OB, ListBase::first, Object::id, ID_RECALC_GEOMETRY, LISTBASE_FOREACH, MOTIONPATH_BAKE_HAS_PATHS, NC_OBJECT, ND_POSE, Main::objects, OPERATOR_CANCELLED, OPERATOR_FINISHED, bAnimVizSettings::path_bakeflag, Object::pose, pose_bone_do_paste(), pose_copybuffer_filepath_get(), POSE_KEY, POSE_PATH_CALC_RANGE_FULL, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, STRNCPY, and WM_event_add_notifier().
Referenced by POSE_OT_paste().
|
static |
Definition at line 512 of file pose_transform.cc.
References BKE_armature_mat_pose_to_bone(), BKE_pchan_apply_mat4(), BLI_listbase_count(), BONE_SELECTED, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, ID_RECALC_GEOMETRY, LISTBASE_FOREACH_INDEX, MEM_freeN(), MEM_mallocN, NC_OBJECT, ND_POSE, OB_ARMATURE, OB_MODE_POSE, OPERATOR_FINISHED, PBONE_VISIBLE, and WM_event_add_notifier().
Referenced by POSE_OT_visual_transform_apply().
|
static |
Definition at line 602 of file pose_transform.cc.
References ANIM_bone_in_visible_collection(), BONE_SELECTED, bPose::chanbase, Object::data, Bone::flag, LISTBASE_FOREACH, Object::pose, and POSE_KEY.
Referenced by pose_copy_exec().