Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions | Variables
pose_slide.c File Reference
#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
}
 

Functions

static int pose_slide_init (bContext *C, wmOperator *op, ePoseSlide_Modes mode)
 
static void pose_slide_exit (bContext *C, wmOperator *op)
 
static void pose_slide_refresh (bContext *C, tPoseSlideOp *pso)
 
static bool pose_frame_range_from_object_get (tPoseSlideOp *pso, Object *ob, float *prevFrameF, float *nextFrameF)
 
static void pose_slide_apply_val (tPoseSlideOp *pso, FCurve *fcu, Object *ob, float *val)
 
static void pose_slide_apply_vec3 (tPoseSlideOp *pso, tPChanFCurveLink *pfl, float vec[3], const char propName[])
 
static void pose_slide_apply_props (tPoseSlideOp *pso, tPChanFCurveLink *pfl, const char prop_prefix[])
 
static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
 
static void pose_slide_rest_pose_apply_vec3 (tPoseSlideOp *pso, float vec[3], float default_value)
 
static void pose_slide_rest_pose_apply_other_rot (tPoseSlideOp *pso, float vec[4], bool quat)
 
static void pose_slide_rest_pose_apply (bContext *C, tPoseSlideOp *pso)
 
static void pose_slide_apply (bContext *C, tPoseSlideOp *pso)
 
static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso)
 
static void pose_slide_reset (tPoseSlideOp *pso)
 
static void pose_slide_draw_status (bContext *C, tPoseSlideOp *pso)
 
static int pose_slide_invoke_common (bContext *C, wmOperator *op, const wmEvent *event)
 
static void pose_slide_toggle_channels_mode (wmOperator *op, tPoseSlideOp *pso, ePoseSlide_Channels channel)
 
static bool pose_slide_toggle_axis_locks (wmOperator *op, tPoseSlideOp *pso, ePoseSlide_AxisLock axis)
 
static int pose_slide_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static void pose_slide_cancel (bContext *C, wmOperator *op)
 
static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *pso)
 
static void pose_slide_opdef_properties (wmOperatorType *ot)
 
static int pose_slide_push_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int pose_slide_push_exec (bContext *C, wmOperator *op)
 
void POSE_OT_push (wmOperatorType *ot)
 
static int pose_slide_relax_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int pose_slide_relax_exec (bContext *C, wmOperator *op)
 
void POSE_OT_relax (wmOperatorType *ot)
 
static int pose_slide_push_rest_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int pose_slide_push_rest_exec (bContext *C, wmOperator *op)
 
void POSE_OT_push_rest (wmOperatorType *ot)
 
static int pose_slide_relax_rest_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int pose_slide_relax_rest_exec (bContext *C, wmOperator *op)
 
void POSE_OT_relax_rest (wmOperatorType *ot)
 
static int pose_slide_breakdown_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
 
void POSE_OT_breakdown (wmOperatorType *ot)
 
static int pose_slide_blend_to_neighbors_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int pose_slide_blend_to_neighbors_exec (bContext *C, wmOperator *op)
 
void POSE_OT_blend_to_neighbors (wmOperatorType *ot)
 
static float pose_propagate_get_boneHoldEndFrame (tPChanFCurveLink *pfl, float startFrame)
 
static bool pose_propagate_get_refVal (Object *ob, FCurve *fcu, float *value)
 
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)
 
void POSE_OT_propagate (wmOperatorType *ot)
 

Variables

static const EnumPropertyItem prop_channels_types []
 
static const EnumPropertyItem prop_axis_lock_types []
 

Detailed Description

Pose 'Sliding' Tools

Definition in file pose_slide.c.

Macro Definition Documentation

◆ OVERSHOOT_RANGE_DELTA

#define OVERSHOOT_RANGE_DELTA   0.2f

Definition at line 84 of file pose_slide.c.

◆ SLIDE_PIXEL_DISTANCE

#define SLIDE_PIXEL_DISTANCE   (300 * U.pixelsize)

Definition at line 83 of file pose_slide.c.

Typedef Documentation

◆ ePosePropagate_Termination

◆ ePoseSlide_AxisLock

Axis Locks.

◆ ePoseSlide_Channels

Transforms/Channels to Affect.

◆ ePoseSlide_Modes

Pose Sliding Modes.

◆ tPosePropagate_ModeData

Termination data needed for some modes - assumes only one of these entries will be needed at a time.

◆ tPoseSlideObject

◆ tPoseSlideOp

typedef struct tPoseSlideOp tPoseSlideOp

Temporary data shared between these operators.

Enumeration Type Documentation

◆ ePosePropagate_Termination

Enumerator
POSE_PROPAGATE_SMART_HOLDS 

Stop after the current hold ends.

POSE_PROPAGATE_LAST_KEY 

Only do on the last keyframe.

POSE_PROPAGATE_NEXT_KEY 

Stop after the next keyframe.

POSE_PROPAGATE_BEFORE_FRAME 

Stop after the specified frame.

POSE_PROPAGATE_BEFORE_END 

Stop when we run out of keyframes.

POSE_PROPAGATE_SELECTED_KEYS 

Only do on keyframes that are selected.

POSE_PROPAGATE_SELECTED_MARKERS 

Only do on the frames where markers are selected.

Definition at line 1750 of file pose_slide.c.

◆ ePoseSlide_AxisLock

Axis Locks.

Enumerator
PS_LOCK_X 
PS_LOCK_Y 
PS_LOCK_Z 

Definition at line 90 of file pose_slide.c.

◆ 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.

◆ ePoseSlide_Modes

Pose Sliding Modes.

Enumerator
POSESLIDE_PUSH 

Exaggerate the pose.

POSESLIDE_RELAX 

soften the pose.

POSESLIDE_BREAKDOWN 

Slide between the endpoint poses, finding a 'soft' spot.

POSESLIDE_PUSH_REST 
POSESLIDE_RELAX_REST 
POSESLIDE_BLEND 

Definition at line 97 of file pose_slide.c.

Function Documentation

◆ pose_frame_range_from_object_get()

static bool pose_frame_range_from_object_get ( tPoseSlideOp pso,
Object ob,
float prevFrameF,
float nextFrameF 
)
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().

◆ POSE_OT_blend_to_neighbors()

void POSE_OT_blend_to_neighbors ( wmOperatorType ot)

◆ POSE_OT_breakdown()

void POSE_OT_breakdown ( wmOperatorType ot)

◆ POSE_OT_propagate()

void POSE_OT_propagate ( wmOperatorType ot)

◆ POSE_OT_push()

void POSE_OT_push ( wmOperatorType ot)

◆ POSE_OT_push_rest()

void POSE_OT_push_rest ( wmOperatorType ot)

◆ POSE_OT_relax()

void POSE_OT_relax ( wmOperatorType ot)

◆ POSE_OT_relax_rest()

void POSE_OT_relax_rest ( wmOperatorType ot)

◆ pose_propagate_exec()

static int pose_propagate_exec ( bContext C,
wmOperator op 
)
static

◆ pose_propagate_fcurve()

static void pose_propagate_fcurve ( wmOperator op,
Object ob,
FCurve fcu,
float  startFrame,
tPosePropagate_ModeData  modeData 
)
static

◆ pose_propagate_get_boneHoldEndFrame()

static float pose_propagate_get_boneHoldEndFrame ( tPChanFCurveLink pfl,
float  startFrame 
)
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().

◆ pose_propagate_get_refVal()

static bool pose_propagate_get_refVal ( Object ob,
FCurve fcu,
float value 
)
static

◆ pose_slide_apply()

static void pose_slide_apply ( bContext C,
tPoseSlideOp pso 
)
static

◆ pose_slide_apply_props()

static void pose_slide_apply_props ( tPoseSlideOp pso,
tPChanFCurveLink pfl,
const char  prop_prefix[] 
)
static

◆ pose_slide_apply_quat()

static void pose_slide_apply_quat ( tPoseSlideOp pso,
tPChanFCurveLink pfl 
)
static

◆ pose_slide_apply_val()

static void pose_slide_apply_val ( tPoseSlideOp pso,
FCurve fcu,
Object ob,
float val 
)
static

◆ pose_slide_apply_vec3()

static void pose_slide_apply_vec3 ( tPoseSlideOp pso,
tPChanFCurveLink pfl,
float  vec[3],
const char  propName[] 
)
static

◆ pose_slide_autoKeyframe()

static void pose_slide_autoKeyframe ( bContext C,
tPoseSlideOp pso 
)
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().

◆ pose_slide_blend_to_neighbors_exec()

static int pose_slide_blend_to_neighbors_exec ( bContext C,
wmOperator op 
)
static

◆ pose_slide_blend_to_neighbors_invoke()

static int pose_slide_blend_to_neighbors_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ pose_slide_breakdown_exec()

static int pose_slide_breakdown_exec ( bContext C,
wmOperator op 
)
static

◆ pose_slide_breakdown_invoke()

static int pose_slide_breakdown_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
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().

◆ pose_slide_cancel()

static void pose_slide_cancel ( bContext C,
wmOperator op 
)
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().

◆ pose_slide_draw_status()

static void pose_slide_draw_status ( bContext C,
tPoseSlideOp pso 
)
static

◆ pose_slide_exec_common()

static int pose_slide_exec_common ( bContext C,
wmOperator op,
tPoseSlideOp pso 
)
static

◆ pose_slide_exit()

static void pose_slide_exit ( bContext C,
wmOperator op 
)
static

◆ pose_slide_init()

static int pose_slide_init ( bContext C,
wmOperator op,
ePoseSlide_Modes  mode 
)
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().

◆ pose_slide_invoke_common()

static int pose_slide_invoke_common ( bContext C,
wmOperator op,
const wmEvent event 
)
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().

◆ pose_slide_modal()

static int pose_slide_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ pose_slide_opdef_properties()

static void pose_slide_opdef_properties ( wmOperatorType ot)
static

◆ pose_slide_push_exec()

static int pose_slide_push_exec ( bContext C,
wmOperator op 
)
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().

◆ pose_slide_push_invoke()

static int pose_slide_push_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
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().

◆ pose_slide_push_rest_exec()

static int pose_slide_push_rest_exec ( bContext C,
wmOperator op 
)
static

◆ pose_slide_push_rest_invoke()

static int pose_slide_push_rest_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
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().

◆ pose_slide_refresh()

static void pose_slide_refresh ( bContext C,
tPoseSlideOp pso 
)
static

◆ pose_slide_relax_exec()

static int pose_slide_relax_exec ( bContext C,
wmOperator op 
)
static

◆ pose_slide_relax_invoke()

static int pose_slide_relax_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
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().

◆ pose_slide_relax_rest_exec()

static int pose_slide_relax_rest_exec ( bContext C,
wmOperator op 
)
static

◆ pose_slide_relax_rest_invoke()

static int pose_slide_relax_rest_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
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().

◆ pose_slide_reset()

static void pose_slide_reset ( tPoseSlideOp pso)
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().

◆ pose_slide_rest_pose_apply()

static void pose_slide_rest_pose_apply ( bContext C,
tPoseSlideOp pso 
)
static

◆ pose_slide_rest_pose_apply_other_rot()

static void pose_slide_rest_pose_apply_other_rot ( tPoseSlideOp pso,
float  vec[4],
bool  quat 
)
static

◆ pose_slide_rest_pose_apply_vec3()

static void pose_slide_rest_pose_apply_vec3 ( tPoseSlideOp pso,
float  vec[3],
float  default_value 
)
static

◆ pose_slide_toggle_axis_locks()

static bool pose_slide_toggle_axis_locks ( wmOperator op,
tPoseSlideOp pso,
ePoseSlide_AxisLock  axis 
)
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().

◆ pose_slide_toggle_channels_mode()

static void pose_slide_toggle_channels_mode ( wmOperator op,
tPoseSlideOp pso,
ePoseSlide_Channels  channel 
)
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().

Variable Documentation

◆ prop_axis_lock_types

const EnumPropertyItem prop_axis_lock_types[]
static
Initial value:
= {
{0, "FREE", 0, "Free", "All axes are affected"},
{PS_LOCK_X, "X", 0, "X", "Only X-axis transforms are affected"},
{PS_LOCK_Y, "Y", 0, "Y", "Only Y-axis transforms are affected"},
{PS_LOCK_Z, "Z", 0, "Z", "Only Z-axis transforms are affected"},
{0, NULL, 0, NULL, NULL},
}
@ PS_LOCK_Z
Definition: pose_slide.c:93
@ PS_LOCK_Y
Definition: pose_slide.c:92
@ PS_LOCK_X
Definition: pose_slide.c:91

Definition at line 193 of file pose_slide.c.

Referenced by pose_slide_opdef_properties().

◆ prop_channels_types

const EnumPropertyItem prop_channels_types[]
static
Initial value:
= {
"ALL",
0,
"All Properties",
"All properties, including transforms, bendy bone shape, and custom properties"},
{PS_TFM_LOC, "LOC", 0, "Location", "Location only"},
{PS_TFM_ROT, "ROT", 0, "Rotation", "Rotation only"},
{PS_TFM_SIZE, "SIZE", 0, "Scale", "Scale only"},
{PS_TFM_BBONE_SHAPE, "BBONE", 0, "Bendy Bone", "Bendy Bone shape properties"},
{PS_TFM_PROPS, "CUSTOM", 0, "Custom Properties", "Custom properties"},
{0, NULL, 0, NULL, NULL},
}
@ PS_TFM_SIZE
Definition: pose_slide.c:115
@ PS_TFM_LOC
Definition: pose_slide.c:113
@ PS_TFM_PROPS
Definition: pose_slide.c:119
@ PS_TFM_ALL
Definition: pose_slide.c:111
@ PS_TFM_BBONE_SHAPE
Definition: pose_slide.c:117
@ PS_TFM_ROT
Definition: pose_slide.c:114

Property enum for ePoseSlide_Channels.

Definition at line 178 of file pose_slide.c.

Referenced by pose_slide_opdef_properties().