Blender  V2.93
Macros | Typedefs | Enumerations | Functions
pose_select.c File Reference
#include <string.h>
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_layer.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_armature.h"
#include "ED_keyframing.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_outliner.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_view3d.h"
#include "armature_intern.h"

Go to the source code of this file.

Macros

#define PBONE_PREV_FLAG_GET(pchan)   ((void)0, (POINTER_AS_INT((pchan)->temp)))
 
#define PBONE_PREV_FLAG_SET(pchan, val)   ((pchan)->temp = POINTER_FROM_INT(val))
 

Typedefs

typedef enum ePose_SelectSame_Mode ePose_SelectSame_Mode
 

Enumerations

enum  ePose_SelectSame_Mode { POSE_SEL_SAME_LAYER = 0 , POSE_SEL_SAME_GROUP = 1 , POSE_SEL_SAME_KEYINGSET = 2 }
 

Functions

static void pose_do_bone_select (bPoseChannel *pchan, const int select_mode)
 
void ED_pose_bone_select_tag_update (Object *ob)
 
void ED_pose_bone_select (Object *ob, bPoseChannel *pchan, bool select)
 
void ED_armature_pose_select_pick_bone (ViewLayer *view_layer, View3D *v3d, Object *ob, Bone *bone, const bool extend, const bool deselect, const bool toggle)
 
bool ED_armature_pose_select_pick_with_buffer (ViewLayer *view_layer, View3D *v3d, Base *base, const uint *buffer, short hits, bool extend, bool deselect, bool toggle, bool do_nearest)
 
void ED_armature_pose_select_in_wpaint_mode (ViewLayer *view_layer, Base *base_select)
 
bool ED_pose_deselect_all (Object *ob, int select_mode, const bool ignore_visibility)
 
static bool ed_pose_is_any_selected (Object *ob, bool ignore_visibility)
 
static bool ed_pose_is_any_selected_multi (Base **bases, uint bases_len, bool ignore_visibility)
 
bool ED_pose_deselect_all_multi_ex (Base **bases, uint bases_len, int select_mode, const bool ignore_visibility)
 
bool ED_pose_deselect_all_multi (bContext *C, int select_mode, const bool ignore_visibility)
 
static void selectconnected_posebonechildren (Object *ob, Bone *bone, int extend)
 
static int pose_select_connected_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool pose_select_linked_pick_poll (bContext *C)
 
void POSE_OT_select_linked_pick (wmOperatorType *ot)
 
static int pose_select_linked_exec (bContext *C, wmOperator *UNUSED(op))
 
void POSE_OT_select_linked (wmOperatorType *ot)
 
static int pose_de_select_all_exec (bContext *C, wmOperator *op)
 
void POSE_OT_select_all (wmOperatorType *ot)
 
static int pose_select_parent_exec (bContext *C, wmOperator *UNUSED(op))
 
void POSE_OT_select_parent (wmOperatorType *ot)
 
static int pose_select_constraint_target_exec (bContext *C, wmOperator *UNUSED(op))
 
void POSE_OT_select_constraint_target (wmOperatorType *ot)
 
static int pose_select_hierarchy_exec (bContext *C, wmOperator *op)
 
void POSE_OT_select_hierarchy (wmOperatorType *ot)
 
static bool pose_select_same_group (bContext *C, bool extend)
 
static bool pose_select_same_layer (bContext *C, bool extend)
 
static bool pose_select_same_keyingset (bContext *C, ReportList *reports, bool extend)
 
static int pose_select_grouped_exec (bContext *C, wmOperator *op)
 
void POSE_OT_select_grouped (wmOperatorType *ot)
 
static int pose_select_mirror_exec (bContext *C, wmOperator *op)
 
void POSE_OT_select_mirror (wmOperatorType *ot)
 

Macro Definition Documentation

◆ PBONE_PREV_FLAG_GET

#define PBONE_PREV_FLAG_GET (   pchan)    ((void)0, (POINTER_AS_INT((pchan)->temp)))

Definition at line 67 of file pose_select.c.

◆ PBONE_PREV_FLAG_SET

#define PBONE_PREV_FLAG_SET (   pchan,
  val 
)    ((pchan)->temp = POINTER_FROM_INT(val))

Definition at line 68 of file pose_select.c.

Typedef Documentation

◆ ePose_SelectSame_Mode

Enumeration Type Documentation

◆ ePose_SelectSame_Mode

Enumerator
POSE_SEL_SAME_LAYER 
POSE_SEL_SAME_GROUP 
POSE_SEL_SAME_KEYINGSET 

Definition at line 855 of file pose_select.c.

Function Documentation

◆ ED_armature_pose_select_in_wpaint_mode()

void ED_armature_pose_select_in_wpaint_mode ( ViewLayer view_layer,
Base base_select 
)

While in weight-paint mode, a single pose may be active as well. While not common, it's possible we have multiple armatures deforming a mesh.

This function de-selects all other objects, and selects the new base. It can't be set to the active object because we need to keep this set to the weight paint object.

Definition at line 280 of file pose_select.c.

References BA_DESELECT, BA_SELECT, BASE_SELECTED, BKE_gpencil_modifiers_get_virtual_modifierlist(), BKE_modifiers_get_virtual_modifierlist(), BKE_view_layer_base_find(), BLI_assert, ED_object_base_select(), eGpencilModifierType_Armature, eModifierType_Armature, Base::flag, Object::mode, GpencilModifierData::next, ModifierData::next, NULL, OB_ARMATURE, OB_GPENCIL, OB_MODE_ALL_WEIGHT_PAINT, OBACT, ArmatureGpencilModifierData::object, Base::object, ArmatureModifierData::object, GpencilModifierData::type, ModifierData::type, and Object::type.

Referenced by bone_select_menu_exec(), and ed_object_select_pick().

◆ ED_armature_pose_select_pick_bone()

void ED_armature_pose_select_pick_bone ( ViewLayer view_layer,
View3D v3d,
Object ob,
Bone bone,
const bool  extend,
const bool  deselect,
const bool  toggle 
)

◆ ED_armature_pose_select_pick_with_buffer()

bool ED_armature_pose_select_pick_with_buffer ( ViewLayer view_layer,
View3D v3d,
Base base,
const uint buffer,
short  hits,
bool  extend,
bool  deselect,
bool  toggle,
bool  do_nearest 
)

Called for mode-less pose selection. assumes the active object is still on old situation.

Definition at line 245 of file pose_select.c.

References buffer, ED_armature_pick_bone_from_selectbuffer(), ED_armature_pose_select_pick_bone(), NULL, Base::object, and Object::pose.

Referenced by ed_object_select_pick().

◆ ED_pose_bone_select()

void ED_pose_bone_select ( Object ob,
bPoseChannel pchan,
bool  select 
)

◆ ED_pose_bone_select_tag_update()

void ED_pose_bone_select_tag_update ( Object ob)

◆ ED_pose_deselect_all()

bool ED_pose_deselect_all ( Object ob,
int  select_mode,
const bool  ignore_visibility 
)

◆ ED_pose_deselect_all_multi()

bool ED_pose_deselect_all_multi ( bContext C,
int  select_mode,
const bool  ignore_visibility 
)

◆ ED_pose_deselect_all_multi_ex()

bool ED_pose_deselect_all_multi_ex ( Base **  bases,
uint  bases_len,
int  select_mode,
const bool  ignore_visibility 
)

◆ ed_pose_is_any_selected()

static bool ed_pose_is_any_selected ( Object ob,
bool  ignore_visibility 
)
static

◆ ed_pose_is_any_selected_multi()

static bool ed_pose_is_any_selected_multi ( Base **  bases,
uint  bases_len,
bool  ignore_visibility 
)
static

Definition at line 378 of file pose_select.c.

References ed_pose_is_any_selected(), and Base::object.

Referenced by ED_pose_deselect_all_multi_ex().

◆ pose_de_select_all_exec()

static int pose_de_select_all_exec ( bContext C,
wmOperator op 
)
static

◆ pose_do_bone_select()

static void pose_do_bone_select ( bPoseChannel pchan,
const int  select_mode 
)
static

◆ POSE_OT_select_all()

void POSE_OT_select_all ( wmOperatorType ot)

◆ POSE_OT_select_constraint_target()

void POSE_OT_select_constraint_target ( wmOperatorType ot)

◆ POSE_OT_select_grouped()

void POSE_OT_select_grouped ( wmOperatorType ot)

◆ POSE_OT_select_hierarchy()

void POSE_OT_select_hierarchy ( wmOperatorType ot)

◆ POSE_OT_select_linked()

void POSE_OT_select_linked ( wmOperatorType ot)

◆ POSE_OT_select_linked_pick()

void POSE_OT_select_linked_pick ( wmOperatorType ot)

◆ POSE_OT_select_mirror()

void POSE_OT_select_mirror ( wmOperatorType ot)

◆ POSE_OT_select_parent()

void POSE_OT_select_parent ( wmOperatorType ot)

◆ pose_select_connected_invoke()

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

◆ pose_select_constraint_target_exec()

static int pose_select_constraint_target_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ pose_select_grouped_exec()

static int pose_select_grouped_exec ( bContext C,
wmOperator op 
)
static

◆ pose_select_hierarchy_exec()

static int pose_select_hierarchy_exec ( bContext C,
wmOperator op 
)
static

◆ pose_select_linked_exec()

static int pose_select_linked_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ pose_select_linked_pick_poll()

static bool pose_select_linked_pick_poll ( bContext C)
static

Definition at line 499 of file pose_select.c.

References C, ED_operator_posemode(), and ED_operator_view3d_active().

Referenced by POSE_OT_select_linked_pick().

◆ pose_select_mirror_exec()

static int pose_select_mirror_exec ( bContext C,
wmOperator op 
)
static

◆ pose_select_parent_exec()

static int pose_select_parent_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ pose_select_same_group()

static bool pose_select_same_group ( bContext C,
bool  extend 
)
static

◆ pose_select_same_keyingset()

static bool pose_select_same_keyingset ( bContext C,
ReportList reports,
bool  extend 
)
static

◆ pose_select_same_layer()

static bool pose_select_same_layer ( bContext C,
bool  extend 
)
static

◆ selectconnected_posebonechildren()

static void selectconnected_posebonechildren ( Object ob,
Bone bone,
int  extend 
)
static