|
Blender V5.0
|
#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_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_string_utf8.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_armature.hh"#include "ANIM_bone_collections.hh"#include "ANIM_keyframing.hh"#include "ANIM_keyingsets.hh"#include "UI_interface_layout.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 391 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, C, 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(), 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 476 of file pose_transform.cc.
References C, CTX_wm_manager(), wmWindowManager::id, wmOperator::layout, uiLayout::prop(), wmOperator::properties, ptr, RNA_pointer_create_discrete(), wmOperatorType::srna, wmOperator::type, and UI_ITEM_NONE.
Referenced by POSE_OT_armature_apply().
|
static |
Definition at line 184 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().
Definition at line 81 of file pose_transform.cc.
References BKE_object_apply_mat4(), BKE_object_calc_parent(), C, 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 215 of file pose_transform.cc.
References applyarmature_adjust_edit_position(), applyarmature_process_selected_recursive(), applyarmature_set_edit_position(), applyarmature_transfer_properties(), Bone::arm_mat, blender::Span< T >::begin(), 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, blender::Span< T >::end(), 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 351 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 370 of file pose_transform.cc.
References applyarmature_reset_bone_constraint(), bPoseChannel::constraints, and LISTBASE_FOREACH.
Referenced by applyarmature_reset_constraints().
|
static |
Definition at line 379 of file pose_transform.cc.
References applyarmature_reset_bone_constraints(), BLI_assert, bPose::chanbase, LISTBASE_FOREACH, and POSE_SELECTED.
Referenced by apply_armature_pose2bones_exec().
|
static |
Definition at line 111 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 144 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, bPoseChannel::scale_in, EditBone::scale_in, bPoseChannel::scale_out, EditBone::scale_out, Bone::segments, unit_axis_angle(), unit_qt(), and zero_v3().
Referenced by apply_armature_pose2bones_exec(), and applyarmature_process_selected_recursive().
|
static |
Definition at line 994 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 1008 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 1020 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 1149 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 962 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, bPoseChannel::scale_in, and bPoseChannel::scale_out.
Referenced by pchan_clear_scale_with_mirrored().
|
static |
Definition at line 982 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 1161 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 611 of file pose_transform.cc.
References axis_angle_to_eulO(), axis_angle_to_quat(), BKE_pose_channel_find_name(), BLI_string_flip_side_name(), 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(), bPoseChannel::flag, IDP_CopyProperty(), IDP_SyncGroupValues(), bPoseChannel::loc, MAXBONENAME, bPoseChannel::name, name, normalize_qt(), Object::pose, POSE_SELECTED, 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, bPoseChannel::scale_in, bPoseChannel::scale_out, STRNCPY_UTF8, and bPoseChannel::system_properties.
Referenced by pose_clear_user_transforms_exec(), and pose_paste_exec().
|
static |
Definition at line 1306 of file pose_transform.cc.
References ANIM_KS_LOCATION_ID, C, pchan_clear_loc_with_mirrored(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_loc_clear().
|
static |
Definition at line 1279 of file pose_transform.cc.
References ANIM_KS_ROTATION_ID, C, pchan_clear_rot_with_mirrored(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_rot_clear().
|
static |
Definition at line 1252 of file pose_transform.cc.
References ANIM_KS_SCALING_ID, C, pchan_clear_scale_with_mirrored(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_scale_clear().
|
static |
Definition at line 1171 of file pose_transform.cc.
References blender::animrig::apply_keyingset(), blender::animrig::autokeyframe_cfra_can_key(), BKE_pose_channel_find_name(), BKE_report(), C, RenderData::cfra, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_get_evaluated(), 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, blender::animrig::get_keyingset_for_autokeying(), Scene::id, 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, Scene::r, blender::animrig::relative_keyingset_add_source(), 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 1333 of file pose_transform.cc.
References ANIM_KS_LOC_ROT_SCALE_ID, C, pchan_clear_transforms(), and pose_clear_transform_generic_exec().
Referenced by POSE_OT_transforms_clear().
|
static |
Definition at line 1361 of file pose_transform.cc.
References Object::adt, ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_pose_copy_data(), BKE_pose_rest(), BLI_freelistN(), C, RenderData::cfra, bPose::chanbase, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), depsgraph, FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, Object::id, ID_RECALC_GEOMETRY, IDP_FreeProperty(), LISTBASE_FOREACH, MEM_freeN(), ID::name, NC_OBJECT, ND_TRANSFORM, OB_ARMATURE, OB_MODE_POSE, OPERATOR_FINISHED, Object::pose, pose_bone_do_paste(), wmOperator::ptr, Scene::r, RNA_boolean_get(), STRNCPY_UTF8, Object::type, and WM_event_add_notifier().
Referenced by POSE_OT_user_transforms_clear().
|
static |
Definition at line 767 of file pose_transform.cc.
References BKE_object_pose_armature_get(), BKE_report(), BLI_assert_msg, blender::animrig::bone_is_visible(), C, bPose::chanbase, blender::bke::blendfile::PartialWriteContext::CLEAR_DEPENDENCIES, CTX_data_active_object(), CTX_data_main(), Object::data, ELEM, Object::id, blender::bke::blendfile::PartialWriteContext::id_add(), ID_IS_PACKED, LISTBASE_FOREACH, OPERATOR_CANCELLED, Object::pose, POSE_SELECTED, wmOperator::reports, and RPT_ERROR.
Referenced by POSE_OT_copy().
|
static |
Definition at line 68 of file pose_transform.cc.
References BKE_tempdir_base(), BLI_path_join, and FILE_MAX.
Referenced by pose_paste_exec().
| void POSE_OT_armature_apply | ( | wmOperatorType * | ot | ) |
Definition at line 486 of file pose_transform.cc.
References apply_armature_pose2bones_exec(), apply_armature_pose2bones_ui(), ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by ED_operatortypes_armature().
| void POSE_OT_copy | ( | wmOperatorType * | ot | ) |
Definition at line 822 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, ot, and pose_copy_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_loc_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1312 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_clear_loc_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_paste | ( | wmOperatorType * | ot | ) |
Definition at line 924 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, pose_paste_exec(), PROP_SKIP_SAVE, RNA_def_boolean(), and RNA_def_property_flag().
Referenced by ED_operatortypes_armature().
| void POSE_OT_rot_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1285 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_clear_rot_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_scale_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1258 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_clear_scale_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_transforms_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1339 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_clear_transforms_exec().
Referenced by ED_operatortypes_armature().
| void POSE_OT_user_transforms_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1424 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, pose_clear_user_transforms_exec(), and RNA_def_boolean().
Referenced by ED_operatortypes_armature().
| void POSE_OT_visual_transform_apply | ( | wmOperatorType * | ot | ) |
Definition at line 581 of file pose_transform.cc.
References ED_operator_posemode(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pose_visual_transform_apply_exec().
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 843 of file pose_transform.cc.
References 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(), C, 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, blender::animrig::get_keyingset_for_autokeying(), 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_PATH_CALC_RANGE_FULL, POSE_SELECTED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, STRNCPY(), and WM_event_add_notifier().
Referenced by POSE_OT_paste().
|
static |
Definition at line 516 of file pose_transform.cc.
References BKE_armature_mat_pose_to_bone(), BKE_pchan_apply_mat4(), BLI_listbase_count(), blender::animrig::bone_is_selected(), C, 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, i, ID_RECALC_GEOMETRY, LISTBASE_FOREACH_INDEX, MEM_freeN(), MEM_malloc_arrayN(), NC_OBJECT, ND_POSE, OB_ARMATURE, OB_MODE_POSE, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by POSE_OT_visual_transform_apply().