36#include "RNA_prototypes.hh"
129 if (adt !=
nullptr && adt->
action !=
nullptr &&
147 if (pchan ==
nullptr) {
202 pbd->
ob, to_blend, to_blend_slot_handle, &anim_eval_context, pbd->
blend_factor);
262 switch (event->
type) {
311 return (
bAction *)asset::temp_id_consumer_ensure_local_id(
350 if (pbd->
act ==
nullptr) {
358 const bool is_interactive = (
event !=
nullptr);
377 if (is_interactive) {
381 op->
ptr, release_confirm_prop);
428 switch (pbd->
state) {
443 BLI_assert_msg(0,
"poselib_blend_cleanup: unexpected pose blend state");
460 if (pbd ==
nullptr) {
525 SNPRINTF(status_string,
IFACE_(
"%s | %s | [Ctrl] - Flip Pose"), tab_string, slider_string);
531 return operator_result;
571 return asset && (asset->get_id_type() ==
ID_AC);
591 ot->
name =
"Apply Pose Asset";
592 ot->
idname =
"POSELIB_OT_apply_pose_asset";
609 "Amount that the pose is applied on top of the existing poses. A negative "
610 "value will subtract the pose instead of adding it",
617 "When enabled, applies the pose flipped over the X-axis");
626 ot->
name =
"Blend Pose Asset";
627 ot->
idname =
"POSELIB_OT_blend_pose_asset";
647 "Amount that the pose is applied on top of the existing poses. A "
648 "negative value will subtract the pose instead of adding it",
660 "When enabled, applies the pose flipped over the X-axis");
666 "Confirm on Release",
667 "Always confirm operation when releasing button");
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
Functions to insert, delete or modify keyframes.
Functionality to interact with keying sets.
Functions to work with animation poses.
Main runtime representation of an asset.
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void void void void void BKE_action_flip_with_pose(bAction *act, Object *ob_arm) ATTR_NONNULL(1
AnimData * BKE_animdata_from_id(const ID *id)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
#define PBONE_SELECTED(arm, bone)
bool CTX_wm_interface_locked(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
class blender::asset_system::AssetRepresentation * CTX_wm_asset(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
void BKE_id_free(Main *bmain, void *idv)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
General operations, lookup, etc. for blender objects.
Object * BKE_object_pose_armature_get(Object *ob)
struct PoseBackup * BKE_pose_backup_create_selected_bones(const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT
void BKE_pose_backup_restore(const struct PoseBackup *pbd)
bool BKE_pose_backup_is_selection_relevant(const struct PoseBackup *pose_backup)
void BKE_pose_backup_free(struct PoseBackup *pbd)
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_msg(a, msg)
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
struct AssetRepresentationHandle AssetRepresentationHandle
#define ANIM_KS_WHOLE_CHARACTER_ID
void ED_area_status_text(ScrArea *area, const char *str)
void ED_workspace_status_text(bContext *C, const char *str)
void ED_slider_status_string_get(const tSlider *slider, char *status_string, size_t size_of_status_string)
void ED_slider_init(tSlider *slider, const wmEvent *event)
void ED_slider_allow_overshoot_set(tSlider *slider, bool lower, bool upper)
void ED_slider_destroy(bContext *C, tSlider *slider)
void ED_slider_allow_increments_set(tSlider *slider, bool value)
tSlider * ED_slider_create(bContext *C)
bool ED_slider_modal(tSlider *slider, const wmEvent *event)
void ED_slider_factor_bounds_set(tSlider *slider, float factor_bound_lower, float factor_bound_upper)
float ED_slider_factor_get(const tSlider *slider)
void ED_slider_factor_set(tSlider *slider, float factor)
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
void ANIM_relative_keyingset_add_source(blender::Vector< PointerRNA > &sources, ID *id, StructRNA *srna, void *data)
KeyingSet * ANIM_get_keyingset_for_autokeying(const Scene *scene, const char *transformKSName)
int ANIM_apply_keyingset(bContext *C, blender::Vector< PointerRNA > *sources, KeyingSet *keyingset, const blender::animrig::ModifyKeyMode mode, const float cfra)
void *(* MEM_callocN)(size_t len, const char *str)
Vector< bActionGroup * > channel_groups_all(bAction *action)
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
void action_deselect_keys(Action &action)
slot_handle_t first_slot_handle(const ::bAction &dna_action)
decltype(::ActionSlot::handle) slot_handle_t
void pose_apply_action_blend(Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context, float blend_factor)
static int poselib_blend_handle_event(bContext *, wmOperator *op, const wmEvent *event)
static bool poselib_asset_in_context(bContext *C)
static Object * get_poselib_object(bContext *C)
static bAction * poselib_action_to_blend(PoseBlendData *pbd)
static int poselib_blend_exit(bContext *C, wmOperator *op)
static void poselib_blend_cleanup(bContext *C, wmOperator *op)
static int poselib_blend_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool poselib_blend_poll(bContext *C)
static void poselib_blend_cancel(bContext *C, wmOperator *op)
static void poselib_blend_apply(bContext *C, wmOperator *op)
void POSELIB_OT_apply_pose_asset(wmOperatorType *ot)
static bAction * flip_pose(bContext *C, Object *ob, bAction *action)
static bAction * poselib_blend_init_get_action(bContext *C, wmOperator *op)
static void poselib_tempload_exit(PoseBlendData *pbd)
static void poselib_backup_posecopy(PoseBlendData *pbd)
static void poselib_keytag_pose(bContext *C, Scene *scene, PoseBlendData *pbd)
static void poselib_blend_free(wmOperator *op)
void POSELIB_OT_blend_pose_asset(wmOperatorType *ot)
static void poselib_blend_set_factor(PoseBlendData *pbd, const float new_factor)
static bool poselib_blend_init_data(bContext *C, wmOperator *op, const wmEvent *event)
static int poselib_blend_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void poselib_toggle_flipped(PoseBlendData *pbd)
static int poselib_blend_exec(bContext *C, wmOperator *op)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
AssetTempIDConsumer * temp_id_consumer
struct PoseBlendData::@306 release_confirm_info
char headerstr[UI_MAX_DRAW_STR]
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
int WM_userdef_event_type_from_keymap_type(int kmitype)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_set_locked_interface(wmWindowManager *wm, bool lock)
void WM_event_add_mousemove(wmWindow *win)