Blender V2.61 - r43446
|
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_fcurve.h"
#include "BKE_context.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_armature.h"
#include "ED_keyframes_draw.h"
#include "ED_markers.h"
#include "ED_screen.h"
#include "armature_intern.h"
Go to the source code of this file.
Definition in file poseSlide.c.
typedef enum ePosePropagate_Termination ePosePropagate_Termination |
typedef enum ePoseSlide_Modes ePoseSlide_Modes |
typedef union tPosePropagate_ModeData tPosePropagate_ModeData |
typedef struct tPoseSlideOp tPoseSlideOp |
POSE_PROPAGATE_SMART_HOLDS | |
POSE_PROPAGATE_LAST_KEY | |
POSE_PROPAGATE_NEXT_KEY | |
POSE_PROPAGATE_BEFORE_FRAME | |
POSE_PROPAGATE_BEFORE_END | |
POSE_PROPAGATE_SELECTED_MARKERS |
Definition at line 901 of file poseSlide.c.
enum ePoseSlide_Modes |
Definition at line 114 of file poseSlide.c.
void POSE_OT_breakdown | ( | wmOperatorType * | ot | ) |
Definition at line 876 of file poseSlide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, 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 1231 of file poseSlide.c.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, POSE_PROPAGATE_BEFORE_END, POSE_PROPAGATE_BEFORE_FRAME, pose_propagate_exec(), POSE_PROPAGATE_LAST_KEY, POSE_PROPAGATE_NEXT_KEY, 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 762 of file poseSlide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, 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_relax | ( | wmOperatorType * | ot | ) |
Definition at line 819 of file poseSlide.c.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, 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().
static int pose_propagate_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1165 of file poseSlide.c.
References AnimData::action, Object::adt, CTX_data_active_object(), CTX_data_scene(), NULL, and object_pose_armature_get().
Referenced by POSE_OT_propagate().
static void pose_propagate_fcurve | ( | wmOperator * | op, |
Object * | ob, | ||
FCurve * | fcu, | ||
float | startFrame, | ||
tPosePropagate_ModeData | modeData | ||
) | [static] |
Definition at line 1086 of file poseSlide.c.
References FCurve::bezt, binarysearch_bezt_index(), CfraElem::cfra, ELEM, tPosePropagate_ModeData::end_frame, BezTriple::f2, ListBase::first, i, CfraElem::next, NULL, POSE_PROPAGATE_BEFORE_FRAME, pose_propagate_get_refVal(), POSE_PROPAGATE_LAST_KEY, POSE_PROPAGATE_NEXT_KEY, POSE_PROPAGATE_SELECTED_MARKERS, POSE_PROPAGATE_SMART_HOLDS, wmOperator::ptr, RNA_enum_get(), tPosePropagate_ModeData::sel_markers, SELECT, FCurve::totvert, and BezTriple::vec.
static float pose_propagate_get_boneHoldEndFrame | ( | Object * | ob, |
tPChanFCurveLink * | pfl, | ||
float | startFrame | ||
) | [static] |
Definition at line 933 of file poseSlide.c.
References actkeyblock_is_valid(), Object::adt, BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), BLI_dlrbTree_search_exact(), BLI_dlrbTree_search_next(), BLI_dlrbTree_search_prev(), compare_ab_cfraPtr(), compare_ak_cfraPtr(), LinkData::data, ActKeyBlock::end, fcurve_to_keylist(), tPChanFCurveLink::fcurves, ListBase::first, if(), ActKeyBlock::next, LinkData::next, NULL, ActKeyBlock::start, ActKeyBlock::totcurve, and ActKeyBlock::val.
Definition at line 1028 of file poseSlide.c.
References FCurve::array_index, FALSE, Object::id, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve(), 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(), RNA_property_type(), and TRUE.
Referenced by pose_propagate_fcurve().
static void pose_slide_apply | ( | bContext * | C, |
tPoseSlideOp * | pso | ||
) | [static] |
Definition at line 452 of file poseSlide.c.
References bPoseChannel::eul, ListBase::first, bPoseChannel::flag, bPoseChannel::loc, tPChanFCurveLink::next, tPoseSlideOp::nextFrame, tPChanFCurveLink::oldprops, tPChanFCurveLink::pchan, tPoseSlideOp::pfLinks, POSE_LOC, POSE_ROT, POSE_SIZE, pose_slide_apply_props(), pose_slide_apply_quat(), pose_slide_apply_vec3(), pose_slide_refresh(), tPoseSlideOp::prevFrame, ROT_MODE_AXISANGLE, bPoseChannel::rotmode, and bPoseChannel::size.
Referenced by pose_slide_exec_common(), pose_slide_invoke_common(), and pose_slide_modal().
static void pose_slide_apply_props | ( | tPoseSlideOp * | pso, |
tPChanFCurveLink * | pfl | ||
) | [static] |
Definition at line 300 of file poseSlide.c.
References LinkData::data, tPChanFCurveLink::fcurves, ListBase::first, if(), len(), LinkData::next, NULL, tPChanFCurveLink::pchan, tPChanFCurveLink::pchan_path, pose_slide_apply_val(), PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, FCurve::rna_path, RNA_pointer_create(), RNA_PoseBone, RNA_property_float_get(), RNA_property_float_set(), RNA_property_int_get(), RNA_property_int_set(), RNA_property_type(), RNA_struct_find_property(), strlen(), and tval().
Referenced by pose_slide_apply().
static void pose_slide_apply_quat | ( | tPoseSlideOp * | pso, |
tPChanFCurveLink * | pfl | ||
) | [static] |
Definition at line 361 of file poseSlide.c.
References add_qt_qtqt(), FCurve::array_index, BLI_sprintfN(), tPoseSlideOp::cframe, copy_qt_qt(), LinkData::data, evaluate_fcurve(), tPChanFCurveLink::fcurves, interp_qt_qtqt(), MEM_freeN(), tPoseSlideOp::mode, tPoseSlideOp::nextFrame, NULL, tPChanFCurveLink::pchan, tPChanFCurveLink::pchan_path, tPoseSlideOp::percentage, poseAnim_mapping_getNextFCurve(), POSESLIDE_BREAKDOWN, POSESLIDE_PUSH, tPoseSlideOp::prevFrame, bPoseChannel::quat, and sub_qt_qtqt().
Referenced by pose_slide_apply().
static void pose_slide_apply_val | ( | tPoseSlideOp * | pso, |
FCurve * | fcu, | ||
float * | val | ||
) | [static] |
Definition at line 202 of file poseSlide.c.
References tPoseSlideOp::cframe, evaluate_fcurve(), tPoseSlideOp::mode, tPoseSlideOp::nextFrame, tPoseSlideOp::percentage, POSESLIDE_BREAKDOWN, POSESLIDE_PUSH, POSESLIDE_RELAX, and tPoseSlideOp::prevFrame.
Referenced by pose_slide_apply_props(), and pose_slide_apply_vec3().
static void pose_slide_apply_vec3 | ( | tPoseSlideOp * | pso, |
tPChanFCurveLink * | pfl, | ||
float | vec[3], | ||
const char | propName[] | ||
) | [static] |
Definition at line 279 of file poseSlide.c.
References FCurve::array_index, BLI_sprintfN(), LinkData::data, tPChanFCurveLink::fcurves, MEM_freeN(), NULL, tPChanFCurveLink::pchan_path, pose_slide_apply_val(), and poseAnim_mapping_getNextFCurve().
Referenced by pose_slide_apply().
static void pose_slide_autoKeyframe | ( | bContext * | C, |
tPoseSlideOp * | pso | ||
) | [static] |
Definition at line 508 of file poseSlide.c.
References tPoseSlideOp::cframe, tPoseSlideOp::ob, tPoseSlideOp::pfLinks, poseAnim_mapping_autoKeyframe(), and tPoseSlideOp::scene.
Referenced by pose_slide_exec_common(), and pose_slide_modal().
static int pose_slide_breakdown_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 860 of file poseSlide.c.
References wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_BREAKDOWN.
Referenced by POSE_OT_breakdown().
static int pose_slide_breakdown_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevt | ||
) | [static] |
Definition at line 843 of file poseSlide.c.
References wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_BREAKDOWN.
Referenced by POSE_OT_breakdown().
static int pose_slide_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 696 of file poseSlide.c.
References OPERATOR_CANCELLED, and pose_slide_exit().
Referenced by POSE_OT_breakdown(), POSE_OT_push(), and POSE_OT_relax().
static void pose_slide_draw_status | ( | tPoseSlideOp * | pso | ) | [static] |
Definition at line 524 of file poseSlide.c.
References BLI_snprintf(), ED_area_headerprint(), tPoseSlideOp::mode, tPoseSlideOp::percentage, POSESLIDE_BREAKDOWN, POSESLIDE_PUSH, POSESLIDE_RELAX, and tPoseSlideOp::sa.
Referenced by pose_slide_invoke_common(), and pose_slide_modal().
static int pose_slide_exec_common | ( | bContext * | C, |
wmOperator * | op, | ||
tPoseSlideOp * | pso | ||
) | [static] |
Definition at line 704 of file poseSlide.c.
References OPERATOR_FINISHED, pose_slide_apply(), pose_slide_autoKeyframe(), and pose_slide_exit().
Referenced by pose_slide_breakdown_exec(), pose_slide_push_exec(), and pose_slide_relax_exec().
static void pose_slide_exit | ( | wmOperator * | op | ) | [static] |
Definition at line 172 of file poseSlide.c.
References BLI_dlrbTree_free(), wmOperator::customdata, tPoseSlideOp::keys, MEM_freeN(), NULL, tPoseSlideOp::pfLinks, and poseAnim_mapping_free().
Referenced by 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_relax_exec(), and pose_slide_relax_invoke().
static int pose_slide_init | ( | bContext * | C, |
wmOperator * | op, | ||
short | mode | ||
) | [static] |
Definition at line 123 of file poseSlide.c.
References AnimData::action, Object::adt, tPoseSlideOp::ar, tPoseSlideOp::arm, BLI_dlrbTree_init(), RenderData::cfra, tPoseSlideOp::cframe, CTX_data_active_object(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, Object::data, ELEM4, bPose::flag, tPoseSlideOp::keys, MEM_callocN(), tPoseSlideOp::mode, tPoseSlideOp::nextFrame, NULL, tPoseSlideOp::ob, object_pose_armature_get(), tPoseSlideOp::percentage, tPoseSlideOp::pfLinks, Object::pose, POSE_DO_UNLOCK, POSE_LOCKED, poseAnim_mapping_get(), tPoseSlideOp::prevFrame, wmOperator::ptr, Scene::r, RNA_float_get(), RNA_int_get(), tPoseSlideOp::sa, and tPoseSlideOp::scene.
Referenced by pose_slide_breakdown_exec(), pose_slide_breakdown_invoke(), pose_slide_push_exec(), pose_slide_push_invoke(), pose_slide_relax_exec(), and pose_slide_relax_invoke().
static int pose_slide_invoke_common | ( | bContext * | C, |
wmOperator * | op, | ||
tPoseSlideOp * | pso | ||
) | [static] |
Definition at line 551 of file poseSlide.c.
References Object::adt, BC_EW_SCROLLCURSOR, BKE_report(), BLI_dlrbTree_linkedlist_sync(), BLI_dlrbTree_search_exact(), BLI_dlrbTree_search_next(), BLI_dlrbTree_search_prev(), ActKeyColumn::cfra, tPoseSlideOp::cframe, compare_ak_cfraPtr(), CTX_wm_window(), LinkData::data, fcurve_to_keylist(), tPChanFCurveLink::fcurves, ListBase::first, tPoseSlideOp::keys, ActKeyColumn::next, LinkData::next, tPChanFCurveLink::next, tPoseSlideOp::nextFrame, NULL, tPoseSlideOp::ob, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, tPoseSlideOp::pfLinks, pose_slide_apply(), pose_slide_draw_status(), pose_slide_exit(), pose_slide_refresh(), ActKeyColumn::prev, tPoseSlideOp::prevFrame, wmOperator::ptr, wmOperator::reports, RNA_int_set(), DLRBT_Tree::root, RPT_ERROR, WM_cursor_modal(), and WM_event_add_modal_handler().
Referenced by pose_slide_breakdown_invoke(), pose_slide_push_invoke(), and pose_slide_relax_invoke().
static int pose_slide_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | evt | ||
) | [static] |
Definition at line 627 of file poseSlide.c.
References tPoseSlideOp::ar, CTX_wm_window(), wmOperator::customdata, ED_area_headerprint(), ESCKEY, LEFTMOUSE, MOUSEMOVE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, tPoseSlideOp::percentage, pose_slide_apply(), pose_slide_autoKeyframe(), pose_slide_draw_status(), pose_slide_exit(), pose_slide_refresh(), pose_slide_reset(), wmOperator::ptr, RIGHTMOUSE, RNA_float_set(), tPoseSlideOp::sa, wmEvent::type, ARegion::winrct, ARegion::winx, WM_cursor_restore(), wmEvent::x, and rcti::xmin.
Referenced by POSE_OT_breakdown(), POSE_OT_push(), and POSE_OT_relax().
static void pose_slide_opdef_properties | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 719 of file poseSlide.c.
References MAXFRAME, MINAFRAME, RNA_def_float_percentage(), RNA_def_int(), and wmOperatorType::srna.
Referenced by POSE_OT_breakdown(), POSE_OT_push(), and POSE_OT_relax().
static int pose_slide_push_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 746 of file poseSlide.c.
References wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_PUSH.
Referenced by POSE_OT_push().
static int pose_slide_push_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevt | ||
) | [static] |
Definition at line 729 of file poseSlide.c.
References wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_PUSH.
Referenced by POSE_OT_push().
static void pose_slide_refresh | ( | bContext * | C, |
tPoseSlideOp * | pso | ||
) | [static] |
Definition at line 195 of file poseSlide.c.
References tPoseSlideOp::ob, poseAnim_mapping_refresh(), and tPoseSlideOp::scene.
Referenced by pose_slide_apply(), pose_slide_invoke_common(), and pose_slide_modal().
static int pose_slide_relax_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 803 of file poseSlide.c.
References wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exec_common(), pose_slide_exit(), pose_slide_init(), and POSESLIDE_RELAX.
Referenced by POSE_OT_relax().
static int pose_slide_relax_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevt | ||
) | [static] |
Definition at line 786 of file poseSlide.c.
References wmOperator::customdata, OPERATOR_CANCELLED, pose_slide_exit(), pose_slide_init(), pose_slide_invoke_common(), and POSESLIDE_RELAX.
Referenced by POSE_OT_relax().
static void pose_slide_reset | ( | tPoseSlideOp * | pso | ) | [static] |
Definition at line 515 of file poseSlide.c.
References tPoseSlideOp::pfLinks, and poseAnim_mapping_reset().
Referenced by pose_slide_modal().