Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_dlrbTree.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_vec_types.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_layer.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_unit.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_path.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "ED_armature.h"
#include "ED_keyframes_keylist.h"
#include "ED_markers.h"
#include "ED_numinput.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_util.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "armature_intern.h"
#include "BLF_api.h"
Go to the source code of this file.
Classes | |
struct | tPoseSlideOp |
struct | tPoseSlideObject |
union | tPosePropagate_ModeData |
Macros | |
#define | SLIDE_PIXEL_DISTANCE (300 * U.pixelsize) |
#define | OVERSHOOT_RANGE_DELTA 0.2f |
Typedefs | |
typedef enum ePoseSlide_AxisLock | ePoseSlide_AxisLock |
typedef enum ePoseSlide_Modes | ePoseSlide_Modes |
typedef enum ePoseSlide_Channels | ePoseSlide_Channels |
typedef struct tPoseSlideOp | tPoseSlideOp |
typedef struct tPoseSlideObject | tPoseSlideObject |
typedef enum ePosePropagate_Termination | ePosePropagate_Termination |
typedef union tPosePropagate_ModeData | tPosePropagate_ModeData |
Enumerations | |
enum | ePoseSlide_AxisLock { PS_LOCK_X = (1 << 0) , PS_LOCK_Y = (1 << 1) , PS_LOCK_Z = (1 << 2) } |
enum | ePoseSlide_Modes { POSESLIDE_PUSH = 0 , POSESLIDE_RELAX , POSESLIDE_BREAKDOWN , POSESLIDE_PUSH_REST , POSESLIDE_RELAX_REST , POSESLIDE_BLEND } |
enum | ePoseSlide_Channels { PS_TFM_ALL = 0 , PS_TFM_LOC , PS_TFM_ROT , PS_TFM_SIZE , PS_TFM_BBONE_SHAPE , PS_TFM_PROPS } |
enum | ePosePropagate_Termination { POSE_PROPAGATE_SMART_HOLDS = 0 , POSE_PROPAGATE_LAST_KEY , POSE_PROPAGATE_NEXT_KEY , POSE_PROPAGATE_BEFORE_FRAME , POSE_PROPAGATE_BEFORE_END , POSE_PROPAGATE_SELECTED_KEYS , POSE_PROPAGATE_SELECTED_MARKERS } |
Variables | |
static const EnumPropertyItem | prop_channels_types [] |
static const EnumPropertyItem | prop_axis_lock_types [] |
Push & Relax, Breakdowner
These tools provide the animator with various capabilities for interactively controlling the spacing of poses, but also for 'pushing' and/or 'relaxing' extremes as they see fit.
Propagate
This tool copies elements of the selected pose to successive keyframes, allowing the animator to go back and modify the poses for some "static" pose controls, without having to repeatedly doing a "next paste" dance.
Pose Sculpting (TODO)
This is yet to be implemented, but the idea here is to use sculpting techniques to make it easier to pose rigs by allowing rigs to be manipulated using a familiar paint-based interface.
Definition in file pose_slide.c.
#define OVERSHOOT_RANGE_DELTA 0.2f |
Definition at line 84 of file pose_slide.c.
#define SLIDE_PIXEL_DISTANCE (300 * U.pixelsize) |
Definition at line 83 of file pose_slide.c.
typedef enum ePosePropagate_Termination ePosePropagate_Termination |
typedef enum ePoseSlide_AxisLock ePoseSlide_AxisLock |
Axis Locks.
typedef enum ePoseSlide_Channels ePoseSlide_Channels |
Transforms/Channels to Affect.
typedef enum ePoseSlide_Modes ePoseSlide_Modes |
Pose Sliding Modes.
typedef union tPosePropagate_ModeData tPosePropagate_ModeData |
Termination data needed for some modes - assumes only one of these entries will be needed at a time.
typedef struct tPoseSlideObject tPoseSlideObject |
typedef struct tPoseSlideOp tPoseSlideOp |
Temporary data shared between these operators.
Definition at line 1750 of file pose_slide.c.
enum ePoseSlide_AxisLock |
enum ePoseSlide_Channels |
Transforms/Channels to Affect.
Enumerator | |
---|---|
PS_TFM_ALL | |
PS_TFM_LOC | |
PS_TFM_ROT | |
PS_TFM_SIZE | |
PS_TFM_BBONE_SHAPE | |
PS_TFM_PROPS |
Definition at line 110 of file pose_slide.c.
enum ePoseSlide_Modes |
Pose Sliding Modes.
Definition at line 97 of file pose_slide.c.
|
static |
Although this lookup is not ideal, we won't be dealing with a lot of objects at a given time. But if it comes to that we can instead store prev/next frame in the tPChanFCurveLink.
Definition at line 331 of file pose_slide.c.
References tPoseSlideObject::nextFrameF, tPoseSlideObject::ob, tPoseSlideOp::ob_data_array, tPoseSlideOp::objects_len, and tPoseSlideObject::prevFrameF.
Referenced by pose_slide_apply_quat(), and pose_slide_apply_val().
void POSE_OT_blend_to_neighbors | ( | wmOperatorType * | ot | ) |
Definition at line 1725 of file pose_slide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_slide_blend_to_neighbors_exec(), pose_slide_blend_to_neighbors_invoke(), pose_slide_cancel(), pose_slide_modal(), and pose_slide_opdef_properties().
Referenced by ED_operatortypes_armature().
void POSE_OT_breakdown | ( | wmOperatorType * | ot | ) |
Definition at line 1675 of file pose_slide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_slide_breakdown_exec(), pose_slide_breakdown_invoke(), pose_slide_cancel(), pose_slide_modal(), and pose_slide_opdef_properties().
Referenced by ED_operatortypes_armature().
void POSE_OT_propagate | ( | wmOperatorType * | ot | ) |
Definition at line 2094 of file pose_slide.c.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, POSE_PROPAGATE_BEFORE_END, POSE_PROPAGATE_BEFORE_FRAME, pose_propagate_exec(), POSE_PROPAGATE_LAST_KEY, POSE_PROPAGATE_NEXT_KEY, POSE_PROPAGATE_SELECTED_KEYS, POSE_PROPAGATE_SELECTED_MARKERS, POSE_PROPAGATE_SMART_HOLDS, wmOperatorType::prop, RNA_def_enum(), RNA_def_float(), and wmOperatorType::srna.
Referenced by ED_operatortypes_armature().
void POSE_OT_push | ( | wmOperatorType * | ot | ) |
Definition at line 1448 of file pose_slide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_slide_cancel(), pose_slide_modal(), pose_slide_opdef_properties(), pose_slide_push_exec(), and pose_slide_push_invoke().
Referenced by ED_operatortypes_armature().
void POSE_OT_push_rest | ( | wmOperatorType * | ot | ) |
Definition at line 1561 of file pose_slide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_slide_cancel(), pose_slide_modal(), pose_slide_opdef_properties(), pose_slide_push_rest_exec(), and pose_slide_push_rest_invoke().
Referenced by ED_operatortypes_armature().
void POSE_OT_relax | ( | wmOperatorType * | ot | ) |
Definition at line 1505 of file pose_slide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_slide_cancel(), pose_slide_modal(), pose_slide_opdef_properties(), pose_slide_relax_exec(), and pose_slide_relax_invoke().
Referenced by ED_operatortypes_armature().
void POSE_OT_relax_rest | ( | wmOperatorType * | ot | ) |
Definition at line 1618 of file pose_slide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_X, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_slide_cancel(), pose_slide_modal(), pose_slide_opdef_properties(), pose_slide_relax_rest_exec(), and pose_slide_relax_rest_invoke().
Referenced by ED_operatortypes_armature().
|
static |
Definition at line 2026 of file pose_slide.c.
References BKE_report(), BLI_freelistN(), BLI_listbase_is_empty(), C, RenderData::cfra, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), LinkData::data, ED_markers_make_cfra_list(), tPosePropagate_ModeData::end_frame, tPChanFCurveLink::fcurves, ListBase::first, FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, Scene::markers, tPChanFCurveLink::next, LinkData::next, NULL, tPChanFCurveLink::ob, OB_ARMATURE, OB_MODE_POSE, OPERATOR_CANCELLED, OPERATOR_FINISHED, pose_propagate_fcurve(), pose_propagate_get_boneHoldEndFrame(), POSE_PROPAGATE_SELECTED_MARKERS, POSE_PROPAGATE_SMART_HOLDS, poseAnim_mapping_free(), poseAnim_mapping_get(), poseAnim_mapping_refresh(), wmOperator::ptr, Scene::r, wmOperator::reports, RNA_enum_get(), RNA_float_get(), RPT_ERROR, scene, tPosePropagate_ModeData::sel_markers, and SELECT.
Referenced by POSE_OT_propagate().
|
static |
Propagate just works along each F-Curve in turn.
Definition at line 1925 of file pose_slide.c.
References FCurve::bezt, BEZT_ISSEL_ANY, BKE_fcurve_bezt_binarysearch_index(), CfraElem::cfra, ELEM, tPosePropagate_ModeData::end_frame, BezTriple::f2, ListBase::first, CfraElem::next, NULL, POSE_PROPAGATE_BEFORE_FRAME, pose_propagate_get_refVal(), POSE_PROPAGATE_LAST_KEY, POSE_PROPAGATE_NEXT_KEY, POSE_PROPAGATE_SELECTED_KEYS, POSE_PROPAGATE_SELECTED_MARKERS, POSE_PROPAGATE_SMART_HOLDS, wmOperator::ptr, RNA_enum_get(), round_fl_to_int(), tPosePropagate_ModeData::sel_markers, SELECT, FCurve::totvert, and BezTriple::vec.
Referenced by pose_propagate_exec().
|
static |
Get frame on which the "hold" for the bone ends. XXX: this may not really work that well if a bone moves on some channels and not others if this happens to be a major issue, scrap this, and just make this happen independently per F-Curve
Definition at line 1788 of file pose_slide.c.
References ACTKEYBLOCK_FLAG_STATIC_HOLD, actkeyblock_get_valid_hold(), Object::adt, ActKeyColumn::cfra, LinkData::data, ED_keylist_create(), ED_keylist_find_exact(), ED_keylist_find_next(), ED_keylist_find_prev(), ED_keylist_free(), ED_keylist_prepare_for_direct_access(), fcurve_to_keylist(), tPChanFCurveLink::fcurves, ListBase::first, ActKeyColumn::next, LinkData::next, NULL, tPChanFCurveLink::ob, and ActKeyColumn::totblock.
Referenced by pose_propagate_exec().
Get reference value from F-Curve using RNA.
Definition at line 1865 of file pose_slide.c.
References FCurve::array_index, float(), Object::id, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, ptr, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_property_array_check(), RNA_property_array_length(), RNA_property_boolean_get(), RNA_property_boolean_get_index(), RNA_property_enum_get(), RNA_property_float_get(), RNA_property_float_get_index(), RNA_property_int_get(), RNA_property_int_get_index(), and RNA_property_type().
Referenced by pose_propagate_fcurve().
|
static |
apply() - perform the pose sliding based on weighting various poses.
Definition at line 782 of file pose_slide.c.
References Object::adt, BKE_nla_tweakedit_remap(), C, tPoseSlideOp::channels, ELEM, bPoseChannel::eul, ListBase::first, bPoseChannel::flag, bPoseChannel::loc, tPChanFCurveLink::next, tPoseSlideOp::nextFrame, tPoseSlideObject::nextFrameF, NLATIME_CONVERT_UNMAP, tPoseSlideObject::ob, tPoseSlideOp::ob_data_array, tPoseSlideOp::objects_len, tPChanFCurveLink::oldprops, tPChanFCurveLink::pchan, tPoseSlideOp::pfLinks, POSE_BBONE_SHAPE, POSE_LOC, POSE_ROT, POSE_SIZE, pose_slide_apply_props(), pose_slide_apply_quat(), pose_slide_apply_vec3(), pose_slide_refresh(), tPoseSlideOp::prevFrame, tPoseSlideObject::prevFrameF, PS_TFM_ALL, PS_TFM_BBONE_SHAPE, PS_TFM_LOC, PS_TFM_PROPS, PS_TFM_ROT, PS_TFM_SIZE, ROT_MODE_AXISANGLE, bPoseChannel::rotmode, bPoseChannel::size, and tPoseSlideObject::valid.
Referenced by pose_slide_exec_common(), pose_slide_invoke_common(), and pose_slide_modal().
|
static |
Helper for apply() - perform sliding for custom properties or bbone properties.
Definition at line 479 of file pose_slide.c.
References LinkData::data, tPChanFCurveLink::fcurves, ListBase::first, float(), if(), len, LinkData::next, NULL, tPChanFCurveLink::ob, tPChanFCurveLink::pchan, tPChanFCurveLink::pchan_path, pose_slide_apply_val(), PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, ptr, FCurve::rna_path, RNA_pointer_create(), RNA_property_boolean_get(), RNA_property_boolean_set(), RNA_property_float_get(), RNA_property_float_set(), RNA_property_int_get(), RNA_property_int_set(), RNA_property_type(), and RNA_struct_find_property().
Referenced by pose_slide_apply().
|
static |
Helper for apply() - perform sliding for quaternion rotations (using quat blending).
Definition at line 558 of file pose_slide.c.
References FCurve::array_index, BLI_assert, BLI_assert_msg, BLI_sprintfN(), tPoseSlideOp::cframe, copy_qt_qt(), LinkData::data, ED_slider_factor_get(), ELEM, evaluate_fcurve(), fabs(), tPChanFCurveLink::fcurves, float(), interp_qt_qtqt(), MEM_freeN, tPoseSlideOp::mode, tPoseSlideOp::nextFrame, normalize_qt(), normalize_qt_qt(), NULL, tPChanFCurveLink::ob, tPChanFCurveLink::pchan, tPChanFCurveLink::pchan_path, pose_frame_range_from_object_get(), poseAnim_mapping_getNextFCurve(), POSESLIDE_BLEND, POSESLIDE_BREAKDOWN, POSESLIDE_PUSH, POSESLIDE_RELAX, tPoseSlideOp::prevFrame, bPoseChannel::quat, quat_to_compatible_quat(), and tPoseSlideOp::slider.
Referenced by pose_slide_apply().
|
static |
Helper for apply() - perform sliding for some value.
Definition at line 353 of file pose_slide.c.
References tPoseSlideOp::cframe, ED_slider_factor_get(), evaluate_fcurve(), fabs(), float(), tPoseSlideOp::mode, tPoseSlideOp::nextFrame, pose_frame_range_from_object_get(), POSESLIDE_BLEND, POSESLIDE_BREAKDOWN, POSESLIDE_PUSH, POSESLIDE_PUSH_REST, POSESLIDE_RELAX, POSESLIDE_RELAX_REST, tPoseSlideOp::prevFrame, and tPoseSlideOp::slider.
Referenced by pose_slide_apply_props(), and pose_slide_apply_vec3().
|
static |
Helper for apply() - perform sliding for some 3-element vector.
Definition at line 445 of file pose_slide.c.
References FCurve::array_index, tPoseSlideOp::axislock, BLI_assert, BLI_sprintfN(), LinkData::data, tPChanFCurveLink::fcurves, lock, MEM_freeN, NULL, tPChanFCurveLink::ob, tPChanFCurveLink::pchan_path, pose_slide_apply_val(), poseAnim_mapping_getNextFCurve(), PS_LOCK_X, PS_LOCK_Y, and PS_LOCK_Z.
Referenced by pose_slide_apply().
|
static |
Perform auto-key-framing after changes were made + confirmed.
Definition at line 860 of file pose_slide.c.
References C, tPoseSlideOp::cframe, tPoseSlideOp::pfLinks, poseAnim_mapping_autoKeyframe(), and tPoseSlideOp::scene.
Referenced by pose_slide_exec_common(), and pose_slide_modal().
|
static |
Definition at line 1709 of file pose_slide.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_BLEND.
Referenced by POSE_OT_blend_to_neighbors().
|
static |
Definition at line 1697 of file pose_slide.c.
References C, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_BLEND.
Referenced by POSE_OT_blend_to_neighbors().
|
static |
Operator exec() - for breakdown.
Definition at line 1659 of file pose_slide.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_BREAKDOWN.
Referenced by POSE_OT_breakdown().
|
static |
Operator invoke()
- for 'breakdown' mode.
Definition at line 1644 of file pose_slide.c.
References C, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_BREAKDOWN.
Referenced by POSE_OT_breakdown().
|
static |
Common code for cancel()
Definition at line 1328 of file pose_slide.c.
References C, and pose_slide_exit().
Referenced by POSE_OT_blend_to_neighbors(), POSE_OT_breakdown(), POSE_OT_push(), POSE_OT_push_rest(), POSE_OT_relax(), and POSE_OT_relax_rest().
|
static |
Draw percentage indicator in status-bar.
TODO: Include hints about locks here.
Definition at line 882 of file pose_slide.c.
References tPoseSlideOp::area, tPoseSlideOp::axislock, BLI_snprintf(), C, tPoseSlideOp::channels, ED_area_status_text(), ED_slider_status_string_get(), ED_workspace_status_text(), ELEM, hasNumInput(), tPoseSlideOp::mode, tPoseSlideOp::num, NUM_STR_REP_LEN, outputNumInput(), POSESLIDE_BLEND, POSESLIDE_BREAKDOWN, POSESLIDE_PUSH, POSESLIDE_RELAX, PS_LOCK_X, PS_LOCK_Y, PS_LOCK_Z, PS_TFM_BBONE_SHAPE, PS_TFM_LOC, PS_TFM_PROPS, PS_TFM_ROT, PS_TFM_SIZE, scene, tPoseSlideOp::scene, tPoseSlideOp::slider, STRNCPY, TIP_, UI_MAX_DRAW_STR, and Scene::unit.
Referenced by pose_slide_invoke_common(), and pose_slide_modal().
|
static |
Common code for exec() methods.
Definition at line 1337 of file pose_slide.c.
References C, ELEM, tPoseSlideOp::mode, OPERATOR_FINISHED, pose_slide_apply(), pose_slide_autoKeyframe(), pose_slide_exit(), pose_slide_rest_pose_apply(), POSESLIDE_PUSH_REST, and POSESLIDE_RELAX_REST.
Referenced by pose_slide_blend_to_neighbors_exec(), pose_slide_breakdown_exec(), pose_slide_push_exec(), pose_slide_push_rest_exec(), pose_slide_relax_exec(), and pose_slide_relax_rest_exec().
|
static |
Exiting the operator (free data).
Definition at line 282 of file pose_slide.c.
References tPoseSlideOp::area, C, wmOperator::customdata, ED_keylist_free(), ED_slider_destroy(), ListBase::first, View3DOverlay::flag, tPoseSlideOp::keylist, MEM_freeN, NULL, tPoseSlideOp::ob_data_array, View3D::overlay, tPoseSlideOp::overlay_flag, tPoseSlideOp::pfLinks, poseAnim_mapping_free(), tPoseSlideOp::slider, and ScrArea::spacedata.
Referenced by pose_slide_blend_to_neighbors_exec(), pose_slide_blend_to_neighbors_invoke(), pose_slide_breakdown_exec(), pose_slide_breakdown_invoke(), pose_slide_cancel(), pose_slide_exec_common(), pose_slide_invoke_common(), pose_slide_modal(), pose_slide_push_exec(), pose_slide_push_invoke(), pose_slide_push_rest_exec(), pose_slide_push_rest_invoke(), pose_slide_relax_exec(), pose_slide_relax_invoke(), pose_slide_relax_rest_exec(), and pose_slide_relax_rest_invoke().
|
static |
Operator custom-data initialization.
Definition at line 205 of file pose_slide.c.
References Object::adt, tPoseSlideOp::area, tPoseSlideOp::axislock, B_UNIT_NONE, BKE_nla_tweakedit_remap(), BKE_view_layer_array_from_objects_in_mode_unique_data, C, RenderData::cfra, tPoseSlideOp::cframe, tPoseSlideOp::channels, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area(), CTX_wm_region(), CTX_wm_view3d(), wmOperator::customdata, ED_keylist_create(), ED_slider_create(), ED_slider_factor_set(), bPose::flag, NumInput::idx_max, initNumInput(), tPoseSlideOp::keylist, MEM_callocN, MEM_freeN, tPoseSlideOp::mode, tPoseSlideOp::nextFrame, tPoseSlideObject::nextFrameF, NLATIME_CONVERT_UNMAP, NULL, tPoseSlideOp::num, NUM_NO_NEGATIVE, tPoseSlideObject::ob, tPoseSlideOp::ob_data_array, OB_MODE_POSE, tPoseSlideOp::objects_len, tPoseSlideOp::pfLinks, Object::pose, POSE_DO_UNLOCK, POSE_LOCKED, poseAnim_mapping_get(), poseAnim_object_get(), tPoseSlideOp::prevFrame, tPoseSlideObject::prevFrameF, wmOperator::ptr, Scene::r, tPoseSlideOp::region, RNA_enum_get(), RNA_float_get(), RNA_int_get(), tPoseSlideOp::scene, tPoseSlideOp::slider, NumInput::unit_type, NumInput::val_flag, and tPoseSlideObject::valid.
Referenced by pose_slide_blend_to_neighbors_exec(), pose_slide_blend_to_neighbors_invoke(), pose_slide_breakdown_exec(), pose_slide_breakdown_invoke(), pose_slide_push_exec(), pose_slide_push_invoke(), pose_slide_push_rest_exec(), pose_slide_push_rest_invoke(), pose_slide_relax_exec(), pose_slide_relax_invoke(), pose_slide_relax_rest_exec(), and pose_slide_relax_rest_invoke().
|
static |
Common code for invoke() methods.
Definition at line 991 of file pose_slide.c.
References Object::adt, tPoseSlideOp::area, BKE_nla_tweakedit_remap(), BKE_report(), C, ActKeyColumn::cfra, tPoseSlideOp::cframe, CTX_wm_window(), wmOperator::customdata, LinkData::data, ED_keylist_find_exact(), ED_keylist_find_next(), ED_keylist_find_prev(), ED_keylist_is_empty(), ED_keylist_prepare_for_direct_access(), ED_slider_init(), ELEM, fcurve_to_keylist(), tPChanFCurveLink::fcurves, ListBase::first, View3DOverlay::flag, float(), tPoseSlideOp::keylist, tPoseSlideOp::mode, tPChanFCurveLink::next, LinkData::next, tPoseSlideOp::nextFrame, tPoseSlideObject::nextFrameF, NLATIME_CONVERT_UNMAP, NULL, tPChanFCurveLink::ob, tPoseSlideObject::ob, tPoseSlideOp::ob_data_array, tPoseSlideOp::objects_len, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, View3D::overlay, tPoseSlideOp::overlay_flag, tPoseSlideOp::pfLinks, pose_slide_apply(), pose_slide_draw_status(), pose_slide_exit(), pose_slide_refresh(), pose_slide_rest_pose_apply(), POSESLIDE_PUSH_REST, POSESLIDE_RELAX_REST, tPoseSlideOp::prevFrame, tPoseSlideObject::prevFrameF, wmOperator::ptr, wmOperator::reports, RNA_int_set(), RPT_ERROR, tPoseSlideOp::slider, ScrArea::spacedata, tPoseSlideObject::valid, WM_CURSOR_EW_SCROLL, WM_cursor_modal_set(), and WM_event_add_modal_handler().
Referenced by pose_slide_blend_to_neighbors_invoke(), pose_slide_breakdown_invoke(), pose_slide_push_invoke(), pose_slide_push_rest_invoke(), pose_slide_relax_invoke(), and pose_slide_relax_rest_invoke().
|
static |
Operator modal()
callback.
Definition at line 1141 of file pose_slide.c.
References applyNumInput(), tPoseSlideOp::area, C, CLAMP, CTX_wm_window(), wmOperator::customdata, ED_area_status_text(), ED_region_tag_redraw(), ED_slider_factor_get(), ED_slider_factor_set(), ED_slider_modal(), ED_workspace_status_text(), ELEM, EVT_BKEY, EVT_CKEY, EVT_ESCKEY, EVT_GKEY, EVT_HKEY, EVT_PADENTER, EVT_RETKEY, EVT_RKEY, EVT_SKEY, EVT_XKEY, EVT_YKEY, EVT_ZKEY, ListBase::first, View3DOverlay::flag, handleNumInput(), hasNumInput(), KM_PRESS, LEFTMOUSE, tPoseSlideOp::mode, MOUSEMOVE, NULL, tPoseSlideOp::num, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, View3D::overlay, pose_slide_apply(), pose_slide_autoKeyframe(), pose_slide_draw_status(), pose_slide_exit(), pose_slide_refresh(), pose_slide_reset(), pose_slide_rest_pose_apply(), pose_slide_toggle_axis_locks(), pose_slide_toggle_channels_mode(), POSESLIDE_PUSH_REST, POSESLIDE_RELAX_REST, PS_LOCK_X, PS_LOCK_Y, PS_LOCK_Z, PS_TFM_BBONE_SHAPE, PS_TFM_LOC, PS_TFM_PROPS, PS_TFM_ROT, PS_TFM_SIZE, wmOperator::ptr, tPoseSlideOp::region, RIGHTMOUSE, RNA_float_set(), tPoseSlideOp::slider, ScrArea::spacedata, wmEvent::type, V3D_OVERLAY_HIDE_BONES, wmEvent::val, and WM_cursor_modal_restore().
Referenced by POSE_OT_blend_to_neighbors(), POSE_OT_breakdown(), POSE_OT_push(), POSE_OT_push_rest(), POSE_OT_relax(), and POSE_OT_relax_rest().
|
static |
Common code for defining RNA properties.
Definition at line 1359 of file pose_slide.c.
References MAXFRAME, MINAFRAME, ot, prop_axis_lock_types, prop_channels_types, PROP_SKIP_SAVE, PS_TFM_ALL, RNA_def_enum(), RNA_def_float_factor(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by POSE_OT_blend_to_neighbors(), POSE_OT_breakdown(), POSE_OT_push(), POSE_OT_push_rest(), POSE_OT_relax(), and POSE_OT_relax_rest().
|
static |
Operator exec()
callback - for push.
Definition at line 1432 of file pose_slide.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_PUSH.
Referenced by POSE_OT_push().
|
static |
Operator invoke()
callback for 'push from breakdown' mode.
Definition at line 1417 of file pose_slide.c.
References C, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_PUSH.
Referenced by POSE_OT_push().
|
static |
Operator exec()
- for push.
Definition at line 1545 of file pose_slide.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_PUSH_REST.
Referenced by POSE_OT_push_rest().
|
static |
Operator invoke()
- for 'push from rest pose' mode.
Definition at line 1530 of file pose_slide.c.
References C, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_PUSH_REST.
Referenced by POSE_OT_push_rest().
|
static |
Helper for apply() / reset() - refresh the data.
Definition at line 316 of file pose_slide.c.
References C, tPoseSlideObject::ob, tPoseSlideOp::ob_data_array, tPoseSlideOp::objects_len, poseAnim_mapping_refresh(), tPoseSlideOp::scene, and tPoseSlideObject::valid.
Referenced by pose_slide_apply(), pose_slide_invoke_common(), pose_slide_modal(), and pose_slide_rest_pose_apply().
|
static |
Operator exec() - for relax.
Definition at line 1489 of file pose_slide.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_RELAX.
Referenced by POSE_OT_relax().
|
static |
Invoke callback - for 'relax to breakdown' mode.
Definition at line 1474 of file pose_slide.c.
References C, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_RELAX.
Referenced by POSE_OT_relax().
|
static |
Operator exec()
- for relax.
Definition at line 1602 of file pose_slide.c.
References C, wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_RELAX_REST.
Referenced by POSE_OT_relax_rest().
|
static |
Operator invoke()
- for 'relax' mode.
Definition at line 1587 of file pose_slide.c.
References C, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_RELAX_REST.
Referenced by POSE_OT_relax_rest().
|
static |
Reset changes made to current pose.
Definition at line 869 of file pose_slide.c.
References tPoseSlideOp::pfLinks, and poseAnim_mapping_reset().
Referenced by pose_slide_modal().
|
static |
apply() - perform the pose sliding between the current pose and the rest pose.
Definition at line 723 of file pose_slide.c.
References C, tPoseSlideOp::channels, ELEM, bPoseChannel::eul, ListBase::first, bPoseChannel::flag, bPoseChannel::loc, tPChanFCurveLink::next, tPChanFCurveLink::oldprops, tPChanFCurveLink::pchan, tPoseSlideOp::pfLinks, POSE_BBONE_SHAPE, POSE_LOC, POSE_ROT, POSE_SIZE, pose_slide_refresh(), pose_slide_rest_pose_apply_other_rot(), pose_slide_rest_pose_apply_vec3(), PS_TFM_ALL, PS_TFM_BBONE_SHAPE, PS_TFM_LOC, PS_TFM_PROPS, PS_TFM_ROT, PS_TFM_SIZE, bPoseChannel::quat, ROT_MODE_AXISANGLE, bPoseChannel::rotmode, and bPoseChannel::size.
Referenced by pose_slide_exec_common(), pose_slide_invoke_common(), and pose_slide_modal().
|
static |
Definition at line 699 of file pose_slide.c.
References ED_slider_factor_get(), tPoseSlideOp::mode, POSESLIDE_RELAX_REST, and tPoseSlideOp::slider.
Referenced by pose_slide_rest_pose_apply().
|
static |
Definition at line 680 of file pose_slide.c.
References tPoseSlideOp::axislock, ED_slider_factor_get(), lock, tPoseSlideOp::mode, POSESLIDE_RELAX_REST, PS_LOCK_X, PS_LOCK_Y, PS_LOCK_Z, and tPoseSlideOp::slider.
Referenced by pose_slide_rest_pose_apply().
|
static |
Handle an event to toggle axis locks - returns whether any change in state is needed.
Definition at line 1112 of file pose_slide.c.
References tPoseSlideOp::axislock, tPoseSlideOp::channels, ELEM, PS_TFM_ALL, PS_TFM_BBONE_SHAPE, PS_TFM_PROPS, wmOperator::ptr, and RNA_enum_set().
Referenced by pose_slide_modal().
|
static |
Handle an event to toggle channels mode.
Definition at line 1089 of file pose_slide.c.
References tPoseSlideOp::axislock, tPoseSlideOp::channels, PS_TFM_ALL, wmOperator::ptr, and RNA_enum_set().
Referenced by pose_slide_modal().
|
static |
Definition at line 193 of file pose_slide.c.
Referenced by pose_slide_opdef_properties().
|
static |
Property enum for ePoseSlide_Channels.
Definition at line 178 of file pose_slide.c.
Referenced by pose_slide_opdef_properties().