162 "All properties, including transforms, bendy bone shape, and custom properties"},
163 {
PS_TFM_LOC,
"LOC", 0,
"Location",
"Location only"},
164 {
PS_TFM_ROT,
"ROT", 0,
"Rotation",
"Rotation only"},
167 {
PS_TFM_PROPS,
"CUSTOM", 0,
"Custom Properties",
"Custom properties"},
180 {0,
"FREE", 0,
"Free",
"All axes are affected"},
181 {
PS_LOCK_X,
"X", 0,
"X",
"Only X-axis transforms are affected"},
182 {
PS_LOCK_Y,
"Y", 0,
"Y",
"Only Y-axis transforms are affected"},
183 {
PS_LOCK_Z,
"Z", 0,
"Z",
"Only Z-axis transforms are affected"},
222 "pose slide objects data");
229 if (ob_iter ==
NULL) {
233 ob_data->
ob = ob_iter;
234 ob_data->
valid =
true;
297 if (ob_data->
valid) {
322 *prevFrameF = *nextFrameF = 0.0f;
329 float prevFrameF, nextFrameF;
372 (*val) -= ((sVal * w2) + (eVal * w1) - (*val)) * pso->
percentage;
378 (*val) += ((sVal * w2) + (eVal * w1) - (*val)) * pso->
percentage;
386 (*val) = ((sVal * w2) + (eVal * w1));
396 const char propName[])
413 if ((lock == 0) || ((lock &
PS_LOCK_X) && (idx == 0)) || ((lock &
PS_LOCK_Y) && (idx == 1)) ||
427 const char prop_prefix[])
443 const char *bPtr, *pPtr;
454 pPtr = strstr(bPtr, prop_prefix);
483 &
ptr, prop, (
int)tval);
511 float prevFrameF, nextFrameF;
546 if (fcu_w && fcu_x && fcu_y && fcu_z) {
551 float quat_prev[4], quat_next[4];
572 float quat_curr[4], quat_breakdown[4];
583 quat_final, quat_breakdown, quat_curr, 1.0f + pso->
percentage);
604 for (
int idx = 0; idx < 3; idx++) {
605 if ((lock == 0) || ((lock &
PS_LOCK_X) && (idx == 0)) || ((lock &
PS_LOCK_Y) && (idx == 1)) ||
607 float diff_val = default_value - vec[idx];
622 float default_values[] = {1.0f, 0.0f, 0.0f, 0.0f};
625 default_values[0] = 0.0f;
626 default_values[2] = 1.0f;
628 for (
int idx = 0; idx < 4; idx++) {
629 float diff_val = default_values[idx] - vec[idx];
711 if (!ob_data->
valid) {
800 strcpy(mode_str,
TIP_(
"Push Pose"));
803 strcpy(mode_str,
TIP_(
"Relax Pose"));
806 strcpy(mode_str,
TIP_(
"Breakdown"));
811 strcpy(mode_str,
TIP_(
"Sliding-Tool"));
817 BLI_strncpy(axis_str,
TIP_(
"[X]/Y/Z axis only (X to clear)"),
sizeof(axis_str));
820 BLI_strncpy(axis_str,
TIP_(
"X/[Y]/Z axis only (Y to clear)"),
sizeof(axis_str));
823 BLI_strncpy(axis_str,
TIP_(
"X/Y/[Z] axis only (Z to clear)"),
sizeof(axis_str));
828 BLI_strncpy(axis_str,
TIP_(
"X/Y/Z = Axis Constraint"),
sizeof(axis_str));
840 TIP_(
"[G]/R/S/B/C - Location only (G to clear) | %s"),
846 TIP_(
"G/[R]/S/B/C - Rotation only (R to clear) | %s"),
852 TIP_(
"G/R/[S]/B/C - Scale only (S to clear) | %s"),
857 TIP_(
"G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s"),
862 TIP_(
"G/R/S/B/[C] - Custom Properties only (C to clear) | %s"),
867 limits_str,
TIP_(
"G/R/S/B/C - Limit to Transform/Property Set"),
sizeof(limits_str));
878 status_str,
sizeof(status_str),
"%s: %s | %s", mode_str, str_ofs, limits_str);
945 if (ob_data->
valid) {
1046 bool do_pose_update =
false;
1050 switch (event->
type) {
1095 if (has_numinput ==
false) {
1100 do_pose_update =
true;
1119 do_pose_update =
true;
1123 switch (event->
type) {
1129 do_pose_update =
true;
1135 do_pose_update =
true;
1141 do_pose_update =
true;
1147 do_pose_update =
true;
1153 do_pose_update =
true;
1161 do_pose_update =
true;
1167 do_pose_update =
true;
1173 do_pose_update =
true;
1192 if (do_pose_update) {
1252 "Weighting factor for which keyframe is favored more",
1262 "Previous Keyframe",
1263 "Frame number of keyframe immediately before the current frame",
1274 "Frame number of keyframe immediately after the current frame",
1284 "Set of properties that are affected");
1291 "Transform axis to restrict effects to");
1337 ot->
name =
"Push Pose from Breakdown";
1339 ot->
description =
"Exaggerate the current pose in regards to the breakdown pose";
1397 ot->
name =
"Relax Pose to Breakdown";
1399 ot->
description =
"Make the current pose more similar to its breakdown pose";
1456 ot->
name =
"Push Pose from Rest Pose";
1458 ot->
description =
"Push the current pose further away from the rest pose";
1516 ot->
name =
"Relax Pose to Rest Pose";
1518 ot->
description =
"Make the current pose more similar to the rest pose";
1576 ot->
name =
"Pose Breakdowner";
1578 ot->
description =
"Create a suitable breakdown pose on the current frame";
1640 float endFrame = startFrame;
1776 float refVal = 0.0f;
1804 if (fcu->
bezt[match].
vec[1][0] < startFrame) {
1816 for (bezt = &fcu->
bezt[i]; i < fcu->totvert; i++, bezt++) {
1826 if (first ==
false) {
1832 if (i != (fcu->
totvert - 1)) {
1861 bezt->
vec[0][1] = bezt->
vec[1][1] = bezt->
vec[2][1] = refVal;
1905 for (pfl = pflinks.
first; pfl; pfl = pfl->
next) {
1947 "Propagate pose to all keyframes after current frame that don't change (Default behavior)"},
1952 "Propagate pose to first keyframe following the current frame only"},
1957 "Propagate pose to the last keyframe only (i.e. making action cyclic)"},
1962 "Propagate pose to all keyframes between current frame and 'Frame' property"},
1966 "Before Last Keyframe",
1967 "Propagate pose to all keyframes from current frame until no more are found"},
1971 "On Selected Keyframes",
1972 "Propagate pose to all selected keyframes"},
1976 "On Selected Markers",
1977 "Propagate pose to all keyframes occurring on frames with Scene Markers after the current "
1983 ot->
name =
"Propagate Pose";
1986 "Copy selected aspects of the current pose to subsequent poses already keyframed";
2002 "Method used to determine when to stop propagating pose to keyframes");
2009 "Frame to stop propagating frames to (for 'Before Frame' mode)",
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
int BKE_fcurve_bezt_binarysearch_index(struct BezTriple array[], float frame, int arraylen, bool *r_replace)
#define BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, v3d, r_len, mode)
#define FOREACH_OBJECT_IN_MODE_END
#define FOREACH_OBJECT_IN_MODE_BEGIN(_view_layer, _v3d, _object_type, _object_mode, _instance)
float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode)
General operations, lookup, etc. for blender objects.
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BLI_dlrbTree_init(DLRBT_Tree *tree)
DLRBT_Node * BLI_dlrbTree_search_exact(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
void BLI_dlrbTree_free(DLRBT_Tree *tree)
DLRBT_Node * BLI_dlrbTree_search_next(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
DLRBT_Node * BLI_dlrbTree_search_prev(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *search_data)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
float normalize_qt(float q[4])
float normalize_qt_qt(float r[4], const float q[4])
void interp_qt_qtqt(float q[4], const float a[4], const float b[4], const float t)
void quat_to_compatible_quat(float q[4], const float a[4], const float old[4])
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define BEZT_ISSEL_ANY(bezt)
Object is a sort of wrapper for general info.
@ ACTKEYBLOCK_FLAG_STATIC_HOLD
bool ED_operator_posemode(struct bContext *C)
void ED_area_status_text(ScrArea *area, const char *str)
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short only_sel)
void poseAnim_mapping_free(ListBase *pfLinks)
void poseAnim_mapping_reset(ListBase *pfLinks)
LinkData * poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path)
void poseAnim_mapping_autoKeyframe(struct bContext *C, struct Scene *scene, ListBase *pfLinks, float cframe)
void poseAnim_mapping_get(struct bContext *C, ListBase *pfLinks)
void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Object *ob)
struct Object * poseAnim_object_get(struct Object *ob_)
short compare_ak_cfraPtr(void *node, void *data)
int actkeyblock_get_valid_hold(ActKeyColumn *ac)
void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, int saction_flag)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void pose_slide_toggle_channels_mode(wmOperator *op, tPoseSlideOp *pso, ePoseSlide_Channels channel)
void POSE_OT_relax_rest(wmOperatorType *ot)
static void pose_slide_exit(wmOperator *op)
static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
void POSE_OT_breakdown(wmOperatorType *ot)
static int pose_slide_push_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int pose_slide_relax_rest_exec(bContext *C, wmOperator *op)
static int pose_slide_relax_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int pose_slide_relax_rest_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static const EnumPropertyItem prop_channels_types[]
union tPosePropagate_ModeData tPosePropagate_ModeData
static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void pose_slide_reset(tPoseSlideOp *pso)
static bool pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value)
struct tPoseSlideOp tPoseSlideOp
static int pose_slide_push_rest_exec(bContext *C, wmOperator *op)
static int pose_slide_invoke_common(bContext *C, wmOperator *op, tPoseSlideOp *pso)
static const EnumPropertyItem prop_axis_lock_types[]
static bool pose_slide_toggle_axis_locks(wmOperator *op, tPoseSlideOp *pso, ePoseSlide_AxisLock axis)
static void pose_slide_draw_status(tPoseSlideOp *pso)
static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, Object *ob, float *val)
static int pose_slide_exec_common(bContext *C, wmOperator *op, tPoseSlideOp *pso)
void POSE_OT_push_rest(wmOperatorType *ot)
static void pose_slide_rest_pose_apply_other_rot(tPoseSlideOp *pso, float vec[4], bool quat)
struct tPoseSlideObject tPoseSlideObject
static void pose_slide_opdef_properties(wmOperatorType *ot)
static void pose_slide_refresh(bContext *C, tPoseSlideOp *pso)
static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
static float pose_propagate_get_boneHoldEndFrame(tPChanFCurveLink *pfl, float startFrame)
void POSE_OT_propagate(wmOperatorType *ot)
static void pose_slide_rest_pose_apply(bContext *C, tPoseSlideOp *pso)
static bool pose_frame_range_from_object_get(tPoseSlideOp *pso, Object *ob, float *prevFrameF, float *nextFrameF)
static void pose_slide_autoKeyframe(bContext *C, tPoseSlideOp *pso)
static int pose_slide_breakdown_exec(bContext *C, wmOperator *op)
static int pose_slide_push_rest_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int pose_slide_push_exec(bContext *C, wmOperator *op)
static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu, float startFrame, tPosePropagate_ModeData modeData)
static int pose_propagate_exec(bContext *C, wmOperator *op)
static void pose_slide_mouse_update_percentage(tPoseSlideOp *pso, wmOperator *op, const wmEvent *event)
static void pose_slide_cancel(bContext *UNUSED(C), wmOperator *op)
void POSE_OT_relax(wmOperatorType *ot)
static void pose_slide_apply_vec3(tPoseSlideOp *pso, tPChanFCurveLink *pfl, float vec[3], const char propName[])
static int pose_slide_relax_exec(bContext *C, wmOperator *op)
void POSE_OT_push(wmOperatorType *ot)
static int pose_slide_init(bContext *C, wmOperator *op, ePoseSlide_Modes mode)
static int pose_slide_breakdown_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void pose_slide_rest_pose_apply_vec3(tPoseSlideOp *pso, float vec[3], float default_value)
ePosePropagate_Termination
@ POSE_PROPAGATE_LAST_KEY
@ POSE_PROPAGATE_BEFORE_FRAME
@ POSE_PROPAGATE_SELECTED_MARKERS
@ POSE_PROPAGATE_BEFORE_END
@ POSE_PROPAGATE_SMART_HOLDS
@ POSE_PROPAGATE_NEXT_KEY
@ POSE_PROPAGATE_SELECTED_KEYS
static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl, const char prop_prefix[])
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
PropertyType RNA_property_type(PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
bool RNA_path_resolve_property(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct ActKeyColumn * next
struct ActKeyColumn * prev
struct bPoseChannel * pchan
struct IDProperty * oldprops
struct tPChanFCurveLink * next
struct tPoseSlideObject * ob_data_array
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)