Blender
V3.3
|
#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLT_translation.h"
#include "DNA_armature_types.h"
#include "BKE_action.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "ED_armature.h"
#include "ED_asset.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "armature_intern.h"
Go to the source code of this file.
Classes | |
struct | PoseBlendData |
Typedefs | |
typedef enum ePoseBlendState | ePoseBlendState |
typedef struct PoseBlendData | PoseBlendData |
Enumerations | |
enum | ePoseBlendState { POSE_BLEND_INIT , POSE_BLEND_BLENDING , POSE_BLEND_ORIGINAL , POSE_BLEND_CONFIRM , POSE_BLEND_CANCEL } |
typedef enum ePoseBlendState ePoseBlendState |
typedef struct PoseBlendData PoseBlendData |
enum ePoseBlendState |
Enumerator | |
---|---|
POSE_BLEND_INIT | |
POSE_BLEND_BLENDING | |
POSE_BLEND_ORIGINAL | |
POSE_BLEND_CONFIRM | |
POSE_BLEND_CANCEL |
Definition at line 47 of file pose_lib_2.c.
Definition at line 302 of file pose_lib_2.c.
References BKE_action_flip_with_pose(), BKE_id_copy_ex(), C, CTX_wm_interface_locked(), CTX_wm_manager(), bAction::id, LIB_ID_COPY_LOCALIZE, NULL, and WM_set_locked_interface().
Referenced by poselib_blend_init_data().
Definition at line 274 of file pose_lib_2.c.
References BKE_object_pose_armature_get(), C, CTX_data_active_object(), and NULL.
Referenced by poselib_blend_init_data(), and poselib_blend_poll().
Definition at line 526 of file pose_lib_2.c.
References C, CTX_wm_asset_handle(), CTX_wm_asset_library_ref(), ED_asset_handle_get_id_type(), ID_AC, and NULL.
Referenced by poselib_blend_poll().
|
static |
Definition at line 86 of file pose_lib_2.c.
References PoseBlendData::act, ED_pose_backup_create_selected_bones(), PoseBlendData::ob, PoseBlendData::pose_backup, POSE_BLEND_BLENDING, POSE_BLEND_INIT, and PoseBlendData::state.
Referenced by poselib_blend_init_data().
|
static |
Definition at line 145 of file pose_lib_2.c.
References PoseBlendData::act, PoseBlendData::area, BKE_animsys_eval_context_construct(), BKE_pose_apply_action_blend(), PoseBlendData::blend_factor, BLI_snprintf(), C, CTX_data_depsgraph_pointer(), wmOperator::customdata, DEG_id_tag_update(), depsgraph, ED_area_status_text(), ED_pose_backup_restore(), ED_workspace_status_text(), PoseBlendData::headerstr, bAction::id, Object::id, ID_RECALC_GEOMETRY, if(), ID::name, NC_OBJECT, ND_POSE, PoseBlendData::needs_redraw, PoseBlendData::ob, PoseBlendData::pose_backup, POSE_BLEND_BLENDING, PoseBlendData::state, TIP_, and WM_event_add_notifier().
Referenced by poselib_blend_exec(), poselib_blend_invoke(), and poselib_blend_modal().
|
static |
Definition at line 470 of file pose_lib_2.c.
References C, wmOperator::customdata, POSE_BLEND_CANCEL, poselib_blend_exit(), and PoseBlendData::state.
Referenced by POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 385 of file pose_lib_2.c.
References PoseBlendData::area, ATTR_FALLTHROUGH, BKE_report(), PoseBlendData::blend_factor, BLI_assert_msg, C, CTX_wm_window(), PoseBlendData::cursor_wrap_enabled, wmOperator::customdata, DEG_id_tag_update(), PoseBlendData::drag_start_xy, ED_area_status_text(), ED_pose_backup_restore(), ED_workspace_status_text(), bPose::flag, Object::id, ID_RECALC_GEOMETRY, NC_OBJECT, ND_POSE, NULL, 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, PoseBlendData::release_confirm_info, wmOperator::reports, RNA_float_set(), RPT_ERROR, scene, PoseBlendData::scene, PoseBlendData::state, WM_cursor_grab_disable(), WM_event_add_mousemove(), and WM_event_add_notifier().
Referenced by poselib_blend_exit().
|
static |
Definition at line 260 of file pose_lib_2.c.
References C, CTX_wm_window(), PoseBlendData::cursor_wrap_enabled, wmOperator::customdata, NULL, PoseBlendData::release_confirm_info, PoseBlendData::use_release_confirm, WM_cursor_grab_enable(), and WM_CURSOR_WRAP_XY.
Referenced by poselib_blend_modal().
|
static |
Definition at line 512 of file pose_lib_2.c.
References C, wmOperator::customdata, NULL, 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 455 of file pose_lib_2.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, OPERATOR_FINISHED, POSE_BLEND_CANCEL, poselib_blend_cleanup(), poselib_blend_free(), and PoseBlendData::state.
Referenced by poselib_blend_cancel(), poselib_blend_exec(), and poselib_blend_modal().
|
static |
Definition at line 431 of file pose_lib_2.c.
References PoseBlendData::act, BKE_id_free(), BLI_assert, PoseBlendData::cursor_wrap_enabled, wmOperator::customdata, ED_pose_backup_free(), PoseBlendData::free_action, MEM_SAFE_FREE, NULL, PoseBlendData::pose_backup, poselib_tempload_exit(), and PoseBlendData::release_confirm_info.
Referenced by poselib_blend_exec(), poselib_blend_exit(), and poselib_blend_invoke().
|
static |
Definition at line 210 of file pose_lib_2.c.
References wmOperator::customdata, ELEM, EVT_ESCKEY, EVT_PADENTER, EVT_RETKEY, 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_slide_mouse_update_blendfactor(), PoseBlendData::release_confirm_info, RIGHTMOUSE, PoseBlendData::state, wmEvent::type, PoseBlendData::use_release_confirm, and wmEvent::val.
Referenced by poselib_blend_modal().
|
static |
Definition at line 319 of file pose_lib_2.c.
References PoseBlendData::act, PoseBlendData::area, BKE_report(), PoseBlendData::blend_factor, BLI_assert, C, copy_v2_v2_int(), CTX_data_scene(), CTX_wm_area(), wmOperator::customdata, Object::data, PoseBlendData::drag_start_xy, ELEM, bPose::flag, flip_pose(), PoseBlendData::free_action, get_poselib_object(), PoseBlendData::init_event_type, MEM_callocN, PoseBlendData::needs_redraw, NULL, PoseBlendData::ob, Object::pose, POSE_BLEND_INIT, POSE_DO_UNLOCK, 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_struct_find_property(), RPT_ERROR, PoseBlendData::scene, PoseBlendData::state, TIP_, wmEvent::type, PoseBlendData::use_release_confirm, WM_userdef_event_type_from_keymap_type(), and wmEvent::xy.
Referenced by poselib_blend_exec(), and poselib_blend_invoke().
|
static |
Definition at line 287 of file pose_lib_2.c.
References BLI_assert, C, CTX_data_main(), CTX_wm_asset_handle(), CTX_wm_asset_library_ref(), wmOperator::customdata, ED_asset_temp_id_consumer_create(), ED_asset_temp_id_consumer_ensure_local_id(), ID_AC, NULL, wmOperator::reports, and PoseBlendData::temp_id_consumer.
Referenced by poselib_blend_init_data().
|
static |
Definition at line 497 of file pose_lib_2.c.
References C, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, poselib_blend_apply(), poselib_blend_free(), poselib_blend_init_data(), and WM_event_add_modal_handler().
Referenced by POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 478 of file pose_lib_2.c.
References C, wmOperator::customdata, ELEM, PoseBlendData::needs_redraw, POSE_BLEND_CANCEL, POSE_BLEND_CONFIRM, poselib_blend_apply(), poselib_blend_cursor_update(), poselib_blend_exit(), poselib_blend_handle_event(), and PoseBlendData::state.
Referenced by POSELIB_OT_blend_pose_asset().
Definition at line 538 of file pose_lib_2.c.
References C, Object::data, ELEM, get_poselib_object(), NULL, Object::pose, and poselib_asset_in_context().
Referenced by POSELIB_OT_apply_pose_asset(), and POSELIB_OT_blend_pose_asset().
|
static |
Definition at line 189 of file pose_lib_2.c.
References PoseBlendData::blend_factor, CLAMPIS, and PoseBlendData::needs_redraw.
Referenced by poselib_slide_mouse_update_blendfactor().
|
static |
Definition at line 99 of file pose_lib_2.c.
References PoseBlendData::act, AnimData::action, ANIM_apply_keyingset(), ANIM_get_keyingset_for_autokeying(), ANIM_KS_WHOLE_CHARACTER_ID, ANIM_relative_keyingset_add_source(), autokeyframe_cfra_can_key(), BKE_animdata_from_id(), BKE_id_is_editable(), BKE_pose_channel_find_name(), BLI_freelistN(), bPoseChannel::bone, C, RenderData::cfra, CTX_data_main(), Object::data, ED_pose_backup_is_selection_relevant(), bAction::groups, bAction::id, Object::id, LISTBASE_FOREACH, MODIFYKEY_MODE_INSERT, NA_EDITED, NC_ANIMATION, ND_KEYFRAME, NULL, PoseBlendData::ob, PBONE_SELECTED, Object::pose, PoseBlendData::pose_backup, Scene::r, scene, and WM_event_add_notifier().
Referenced by poselib_blend_cleanup().
void POSELIB_OT_apply_pose_asset | ( | wmOperatorType * | ot | ) |
Definition at line 549 of file pose_lib_2.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, poselib_blend_exec(), poselib_blend_poll(), RNA_def_boolean(), RNA_def_float_factor(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
void POSELIB_OT_blend_pose_asset | ( | wmOperatorType * | ot | ) |
Definition at line 580 of file pose_lib_2.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, 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 195 of file pose_lib_2.c.
References PoseBlendData::area, PoseBlendData::drag_start_xy, poselib_blend_set_factor(), PoseBlendData::release_confirm_info, PoseBlendData::use_release_confirm, ScrArea::v1, ScrVert::vec, ScrArea::winx, and vec2s::x.
Referenced by poselib_blend_handle_event().
|
static |
Definition at line 282 of file pose_lib_2.c.
References ED_asset_temp_id_consumer_free(), and PoseBlendData::temp_id_consumer.
Referenced by poselib_blend_free().