|
Blender V4.3
|
#include <cmath>#include <cstring>#include "AS_asset_representation.hh"#include "MEM_guardedalloc.h"#include "BLI_string.h"#include "BLT_translation.hh"#include "DNA_armature_types.h"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_armature.hh"#include "BKE_context.hh"#include "BKE_lib_id.hh"#include "BKE_object.hh"#include "BKE_pose_backup.h"#include "BKE_report.hh"#include "DEG_depsgraph.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "ED_asset.hh"#include "ED_keyframing.hh"#include "ED_screen.hh"#include "ED_util.hh"#include "ANIM_action.hh"#include "ANIM_action_legacy.hh"#include "ANIM_bone_collections.hh"#include "ANIM_keyframing.hh"#include "ANIM_keyingsets.hh"#include "ANIM_pose.hh"#include "armature_intern.hh"Go to the source code of this file.
Classes | |
| struct | PoseBlendData |
Enumerations | |
| enum | ePoseBlendState { POSE_BLEND_INIT , POSE_BLEND_BLENDING , POSE_BLEND_ORIGINAL , POSE_BLEND_CONFIRM , POSE_BLEND_CANCEL } |
| enum ePoseBlendState |
| Enumerator | |
|---|---|
| POSE_BLEND_INIT | |
| POSE_BLEND_BLENDING | |
| POSE_BLEND_ORIGINAL | |
| POSE_BLEND_CONFIRM | |
| POSE_BLEND_CANCEL | |
Definition at line 57 of file pose_lib_2.cc.
Definition at line 315 of file pose_lib_2.cc.
References BKE_action_flip_with_pose(), BKE_id_copy_ex(), CTX_wm_interface_locked(), CTX_wm_manager(), bAction::id, LIB_ID_COPY_LOCALIZE, and WM_set_locked_interface().
Referenced by poselib_blend_init_data().
Definition at line 289 of file pose_lib_2.cc.
References BKE_object_pose_armature_get(), and CTX_data_active_object().
Referenced by poselib_blend_init_data(), and poselib_blend_poll().
|
static |
Return the bAction that should be blended. This is either pbd->act or pbd->act_flipped, depending on is_flipped.
Definition at line 102 of file pose_lib_2.cc.
References PoseBlendData::act, PoseBlendData::act_flipped, and PoseBlendData::is_flipped.
Referenced by poselib_backup_posecopy(), poselib_blend_apply(), and poselib_keytag_pose().
|
static |
Definition at line 567 of file pose_lib_2.cc.
References CTX_wm_asset(), and ID_AC.
Referenced by poselib_blend_poll().
|
static |
Definition at line 108 of file pose_lib_2.cc.
References BKE_pose_backup_create_selected_bones(), PoseBlendData::ob, PoseBlendData::pose_backup, POSE_BLEND_BLENDING, POSE_BLEND_INIT, poselib_action_to_blend(), and PoseBlendData::state.
Referenced by poselib_blend_init_data(), and poselib_toggle_flipped().
|
static |
Definition at line 174 of file pose_lib_2.cc.
References BKE_animsys_eval_context_construct(), BKE_pose_backup_restore(), PoseBlendData::blend_factor, CTX_data_depsgraph_pointer(), wmOperator::customdata, DEG_id_tag_update(), depsgraph, blender::animrig::first_slot_handle(), Object::id, ID_RECALC_GEOMETRY, NC_OBJECT, ND_POSE, PoseBlendData::needs_redraw, PoseBlendData::ob, blender::animrig::pose_apply_action_blend(), PoseBlendData::pose_backup, POSE_BLEND_BLENDING, poselib_action_to_blend(), PoseBlendData::state, and WM_event_add_notifier().
Referenced by poselib_blend_exec(), poselib_blend_invoke(), and poselib_blend_modal().
|
static |
Definition at line 494 of file pose_lib_2.cc.
References wmOperator::customdata, POSE_BLEND_CANCEL, poselib_blend_exit(), and PoseBlendData::state.
Referenced by POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 411 of file pose_lib_2.cc.
References PoseBlendData::area, ATTR_FALLTHROUGH, BKE_pose_backup_restore(), BKE_report(), PoseBlendData::blend_factor, BLI_assert_msg, CTX_wm_window(), wmOperator::customdata, DEG_id_tag_update(), ED_area_status_text(), ED_slider_destroy(), ED_workspace_status_text(), bPose::flag, Object::id, ID_RECALC_GEOMETRY, PoseBlendData::is_flipped, NC_OBJECT, ND_POSE, PoseBlendData::ob, Object::pose, PoseBlendData::pose_backup, POSE_BLEND_BLENDING, POSE_BLEND_CANCEL, POSE_BLEND_CONFIRM, POSE_BLEND_INIT, POSE_BLEND_ORIGINAL, POSE_DO_UNLOCK, poselib_keytag_pose(), wmOperator::ptr, wmOperator::reports, RNA_boolean_set(), RNA_float_set(), RPT_ERROR, PoseBlendData::scene, PoseBlendData::slider, PoseBlendData::state, WM_event_add_mousemove(), and WM_event_add_notifier().
Referenced by poselib_blend_exit().
|
static |
Definition at line 553 of file pose_lib_2.cc.
References wmOperator::customdata, OPERATOR_CANCELLED, POSE_BLEND_CONFIRM, poselib_blend_apply(), poselib_blend_exit(), poselib_blend_free(), poselib_blend_init_data(), and PoseBlendData::state.
Referenced by POSELIB_OT_apply_pose_asset(), and POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 476 of file pose_lib_2.cc.
References CTX_wm_window(), wmOperator::customdata, OPERATOR_CANCELLED, OPERATOR_FINISHED, POSE_BLEND_CANCEL, poselib_blend_cleanup(), poselib_blend_free(), PoseBlendData::state, and WM_cursor_modal_restore().
Referenced by poselib_blend_cancel(), poselib_blend_exec(), and poselib_blend_modal().
|
static |
Definition at line 457 of file pose_lib_2.cc.
References PoseBlendData::act_flipped, BKE_id_free(), BKE_pose_backup_free(), wmOperator::customdata, MEM_SAFE_FREE, PoseBlendData::pose_backup, and poselib_tempload_exit().
Referenced by poselib_blend_exec(), poselib_blend_exit(), and poselib_blend_invoke().
|
static |
Definition at line 227 of file pose_lib_2.cc.
References wmOperator::customdata, ED_slider_factor_get(), ED_slider_modal(), ELEM, EVT_ESCKEY, EVT_LEFTCTRLKEY, EVT_PADENTER, EVT_RETKEY, EVT_RIGHTCTRLKEY, EVT_SPACEKEY, EVT_TABKEY, PoseBlendData::init_event_type, KM_NOTHING, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, PoseBlendData::needs_redraw, OPERATOR_RUNNING_MODAL, POSE_BLEND_BLENDING, POSE_BLEND_CANCEL, POSE_BLEND_CONFIRM, POSE_BLEND_ORIGINAL, poselib_blend_set_factor(), poselib_toggle_flipped(), PoseBlendData::release_confirm_info, RIGHTMOUSE, PoseBlendData::slider, PoseBlendData::state, wmEvent::type, PoseBlendData::use_release_confirm, and wmEvent::val.
Referenced by poselib_blend_modal().
|
static |
Definition at line 333 of file pose_lib_2.cc.
References PoseBlendData::act, PoseBlendData::act_flipped, PoseBlendData::area, BKE_report(), PoseBlendData::blend_factor, BLI_assert, CTX_data_scene(), CTX_wm_area(), wmOperator::customdata, Object::data, ED_slider_allow_increments_set(), ED_slider_allow_overshoot_set(), ED_slider_create(), ED_slider_factor_bounds_set(), ED_slider_factor_set(), ED_slider_init(), ELEM, bPose::flag, flip_pose(), get_poselib_object(), PoseBlendData::init_event_type, PoseBlendData::is_flipped, KM_RELEASE, MEM_callocN, PoseBlendData::needs_redraw, PoseBlendData::ob, Object::pose, POSE_BLEND_INIT, POSE_LOCKED, poselib_backup_posecopy(), poselib_blend_init_get_action(), wmOperator::ptr, PoseBlendData::release_confirm_info, wmOperator::reports, RNA_boolean_get(), RNA_float_get(), RNA_property_boolean_get(), RNA_property_is_set(), RNA_struct_find_property(), RPT_ERROR, PoseBlendData::scene, PoseBlendData::slider, PoseBlendData::state, wmEvent::type, PoseBlendData::use_release_confirm, and WM_userdef_event_type_from_keymap_type().
Referenced by poselib_blend_exec(), and poselib_blend_invoke().
|
static |
Definition at line 303 of file pose_lib_2.cc.
References CTX_data_main(), CTX_wm_asset(), wmOperator::customdata, ID_AC, wmOperator::reports, and PoseBlendData::temp_id_consumer.
Referenced by poselib_blend_init_data().
|
static |
Definition at line 535 of file pose_lib_2.cc.
References CTX_wm_window(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, poselib_blend_apply(), poselib_blend_free(), poselib_blend_init_data(), WM_CURSOR_EW_SCROLL, WM_cursor_modal_set(), and WM_event_add_modal_handler().
Referenced by POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 502 of file pose_lib_2.cc.
References wmOperator::customdata, ED_slider_status_string_get(), ED_workspace_status_text(), ELEM, IFACE_, PoseBlendData::needs_redraw, POSE_BLEND_BLENDING, POSE_BLEND_CANCEL, POSE_BLEND_CONFIRM, poselib_blend_apply(), poselib_blend_exit(), poselib_blend_handle_event(), PoseBlendData::slider, SNPRINTF, PoseBlendData::state, STRNCPY, and UI_MAX_DRAW_STR.
Referenced by POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 575 of file pose_lib_2.cc.
References Object::data, ELEM, get_poselib_object(), Object::pose, and poselib_asset_in_context().
Referenced by POSELIB_OT_apply_pose_asset(), and POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 207 of file pose_lib_2.cc.
References PoseBlendData::blend_factor, and PoseBlendData::needs_redraw.
Referenced by poselib_blend_handle_event().
|
static |
Definition at line 122 of file pose_lib_2.cc.
References AnimData::action, blender::animrig::action_deselect_keys(), ANIM_apply_keyingset(), ANIM_get_keyingset_for_autokeying(), ANIM_KS_WHOLE_CHARACTER_ID, ANIM_relative_keyingset_add_source(), blender::animrig::autokeyframe_cfra_can_key(), BKE_animdata_from_id(), BKE_id_is_editable(), BKE_pose_backup_is_selection_relevant(), BKE_pose_channel_find_name(), bPoseChannel::bone, blender::animrig::legacy::channel_groups_all(), CTX_data_main(), Object::data, bAction::id, Object::id, blender::animrig::INSERT, NA_EDITED, NC_ANIMATION, ND_KEYFRAME, PoseBlendData::ob, PBONE_SELECTED, Object::pose, PoseBlendData::pose_backup, poselib_action_to_blend(), and WM_event_add_notifier().
Referenced by poselib_blend_cleanup().
| void POSELIB_OT_apply_pose_asset | ( | wmOperatorType * | ot | ) |
Definition at line 586 of file pose_lib_2.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, poselib_blend_exec(), poselib_blend_poll(), PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_float_factor(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
| void POSELIB_OT_blend_pose_asset | ( | wmOperatorType * | ot | ) |
Definition at line 621 of file pose_lib_2.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, poselib_blend_cancel(), poselib_blend_exec(), poselib_blend_invoke(), poselib_blend_modal(), poselib_blend_poll(), PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_float_factor(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 297 of file pose_lib_2.cc.
References PoseBlendData::temp_id_consumer.
Referenced by poselib_blend_free().
|
static |
Definition at line 213 of file pose_lib_2.cc.
References BKE_pose_backup_free(), BKE_pose_backup_restore(), PoseBlendData::is_flipped, PoseBlendData::needs_redraw, PoseBlendData::pose_backup, and poselib_backup_posecopy().
Referenced by poselib_blend_handle_event().