114 view_layer->
basact = base;
154 bool any_visible =
false;
155 bool changed =
false;
188 *r_any_visible = any_visible;
228 int priority_best = 0;
231 if (base->object && base->object->data ==
id) {
238 if (priority_test > priority_best) {
239 priority_best = priority_test;
281 const char *bone_name,
282 const bool reveal_hidden)
370 if (obact && obact->
mode) {
387 short obtype, extend;
397 if (base->object->type == obtype) {
415 ot->
name =
"Select by Type";
416 ot->
description =
"Select all visible objects that are of a type";
417 ot->
idname =
"OBJECT_OT_select_by_type";
432 "Extend selection instead of deselecting everything first");
467 bool changed =
false;
471 if (base->object->data == obdata) {
484 bool changed =
false;
488 Object *ob = base->object;
509 bool changed =
false;
517 base->object->instance_collection :
519 if (instance_collection == instance_collection_other) {
533 bool changed =
false;
540 for (psys = base->object->particlesystem.first; psys; psys = psys->
next) {
560 bool changed =
false;
564 if (
lib == base->object->id.lib) {
577 bool changed =
false;
581 if (base->object->data &&
lib == ((
ID *)base->object->data)->lib) {
595 bool changed =
false;
600 else if (idtype ==
ID_MA) {
603 else if (idtype ==
ID_LI) {
621 bool changed =
false, extend;
629 ob =
OBACT(view_layer);
700 ot->
name =
"Select Linked";
701 ot->
description =
"Select all visible objects that are linked";
702 ot->
idname =
"OBJECT_OT_select_linked";
717 "Extend selection instead of deselecting everything first");
755 "Objects included in active Keying Set"},
762 bool changed =
false;
765 if (ob == base->object->
parent) {
785 bool changed =
false;
802 #define COLLECTION_MENU_MAX 24
807 bool changed =
false;
815 collection = collection->
id.
next) {
826 collection = ob_collections[0];
844 collection = ob_collections[i];
848 "OBJECT_OT_select_same_collection",
862 bool changed =
false;
886 bool changed =
false;
901 bool changed =
false;
904 if (base->object->type ==
OB_LAMP) {
905 Light *la_test = base->object->data;
917 bool changed =
false;
931 bool changed =
false;
945 bool changed =
false;
961 bool changed =
false;
973 "Use another Keying Set, as the active one depends on the currently "
974 "selected objects or cannot find any targets due to unsuitable context");
996 if (ksp->
id == (
ID *)base->object) {
1016 bool changed =
false, extend;
1024 ob =
OBACT(view_layer);
1085 ot->
name =
"Select Grouped";
1086 ot->
description =
"Select all visible objects grouped by various properties";
1087 ot->
idname =
"OBJECT_OT_select_grouped";
1102 "Extend selection instead of deselecting everything first");
1117 bool any_visible =
false;
1130 if (any_visible ==
false) {
1142 ot->
name =
"(De)select All";
1143 ot->
description =
"Change selection of all visible objects in scene";
1144 ot->
idname =
"OBJECT_OT_select_all";
1203 ot->
name =
"Select Same Collection";
1205 ot->
idname =
"OBJECT_OT_select_same_collection";
1238 if (!
STREQ(name_flip, primbase->object->id.name + 2)) {
1249 if (extend ==
false) {
1268 ot->
name =
"Select Mirror";
1270 "Select the mirror objects of the selected object e.g. \"L.sword\" and \"R.sword\"";
1271 ot->
idname =
"OBJECT_OT_select_mirror";
1281 ot->
srna,
"extend", 0,
"Extend",
"Extend selection instead of deselecting everything first");
1295 Object *ob = base->object;
1314 for (ctx_base = ctx_base_list.
first; ctx_base; ctx_base = ctx_base->
next) {
1324 bool changed =
false;
1328 for (ctx_base = ctx_base_list.
first; ctx_base; ctx_base = ctx_base->
next) {
1361 ot->
name =
"Select More";
1362 ot->
idname =
"OBJECT_OT_select_more";
1392 ot->
name =
"Select Less";
1393 ot->
idname =
"OBJECT_OT_select_less";
1394 ot->
description =
"Deselect objects at the boundaries of parent/child relationships";
1419 int elem_map_len = 0;
1423 for (ctx_link = ctx_data_list.
first; ctx_link; ctx_link = ctx_link->
next) {
1424 elem_map[elem_map_len++] = ctx_link->
ptr.
data;
1429 const int count_select = elem_map_len * randfac;
1430 for (
int i = 0; i < count_select; i++) {
1447 ot->
name =
"Select Random";
1449 ot->
idname =
"OBJECT_OT_select_random";
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
bool BKE_collection_has_object(struct Collection *collection, const struct Object *ob)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
struct Base * CTX_data_active_base(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
#define CTX_DATA_COUNT(C, member)
int CTX_data_selectable_bases(const bContext *C, ListBase *list)
struct Main * CTX_data_main(const bContext *C)
#define FOREACH_VISIBLE_BASE_END
#define FOREACH_VISIBLE_BASE_BEGIN(_view_layer, _v3d, _instance)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
struct ID * BKE_libblock_find_name(struct Main *bmain, short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
General operations, lookup, etc. for blender objects.
struct ParticleSystem * psys_get_current(struct Object *ob)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_object_base_flag_sync_from_base(struct Base *base)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE unsigned int bitscan_forward_uint(unsigned int a)
MINLINE bool compare_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT
void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_num, unsigned int seed)
size_t BLI_string_flip_side_name(char *r_name, const char *from_name, bool strip_number, size_t name_len)
#define BLT_I18NCONTEXT_ID_ID
void DEG_id_tag_update(struct ID *id, int flag)
Object groups, one object can be in many groups at once.
#define OB_DATA_SUPPORT_ID(_id_type)
#define OBEDIT_FROM_VIEW_LAYER(view_layer)
#define OBACT(_view_layer)
#define BASE_VISIBLE(v3d, base)
#define EBONE_SELECTABLE(arm, ebone)
bool ED_object_editmode_exit_multi_ex(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, int flag)
bool ED_object_mode_set(struct bContext *C, eObjectMode mode)
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
bool ED_operator_objectmode(struct bContext *C)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
bool ED_armature_edit_deselect_all(Object *obedit)
void ED_armature_edit_sync_selection(ListBase *edbo)
void ED_armature_ebone_select_set(EditBone *ebone, bool select)
EditBone * ED_armature_ebone_find_name(const ListBase *edbo, const char *name)
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
static unsigned long seed
eModifyKey_Returns ANIM_validate_keyingset(bContext *C, ListBase *dsources, KeyingSet *ks)
KeyingSet * ANIM_scene_get_active_keyingset(const Scene *scene)
static int collection_count(const ListBase *lb)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
bool active
all scheduled work for the GPU.
static bool object_select_all_by_instance_collection(bContext *C, Object *ob)
static const EnumPropertyItem prop_select_linked_types[]
static bool select_grouped_lighttype(bContext *C, Object *ob)
void OBJECT_OT_select_linked(wmOperatorType *ot)
static int get_base_select_priority(Base *base)
static bool select_grouped_children(bContext *C, Object *ob, const bool recursive)
static bool object_select_all_by_material(bContext *C, Material *mat)
static bool select_grouped_collection(bContext *C, Object *ob)
void OBJECT_OT_select_by_type(wmOperatorType *ot)
void ED_object_base_activate_with_mode_exit_if_needed(bContext *C, Base *base)
static int object_select_same_collection_exec(bContext *C, wmOperator *op)
static int object_select_all_exec(bContext *C, wmOperator *op)
bool ED_object_base_deselect_all_ex(ViewLayer *view_layer, View3D *v3d, int action, bool *r_any_visible)
#define COLLECTION_MENU_MAX
static int object_select_linked_exec(bContext *C, wmOperator *op)
static bool object_select_more_less(bContext *C, const bool select)
void OBJECT_OT_select_grouped(wmOperatorType *ot)
void OBJECT_OT_select_less(wmOperatorType *ot)
static int object_select_mirror_exec(bContext *C, wmOperator *op)
static bool select_grouped_object_hooks(bContext *C, Object *ob)
void ED_object_select_linked_by_id(bContext *C, ID *id)
bool ED_object_jump_to_bone(bContext *C, Object *ob, const char *bone_name, const bool reveal_hidden)
static bool objects_selectable_poll(bContext *C)
static bool select_grouped_color(bContext *C, Object *ob)
@ OBJECT_GRPSEL_LIGHT_TYPE
@ OBJECT_GRPSEL_KEYINGSET
@ OBJECT_GRPSEL_CHILDREN_RECURSIVE
@ OBJECT_GRPSEL_COLLECTION
void OBJECT_OT_select_same_collection(wmOperatorType *ot)
static int object_select_grouped_exec(bContext *C, wmOperator *op)
void OBJECT_OT_select_mirror(wmOperatorType *ot)
static bool select_grouped_index_object(bContext *C, Object *ob)
static bool object_select_all_by_obdata(bContext *C, void *obdata)
static bool select_grouped_siblings(bContext *C, Object *ob)
static bool select_grouped_parent(bContext *C)
void OBJECT_OT_select_all(wmOperatorType *ot)
static int object_select_less_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_select_random(wmOperatorType *ot)
static bool object_select_all_by_particle(bContext *C, Object *ob)
bool ED_object_base_deselect_all(ViewLayer *view_layer, View3D *v3d, int action)
void ED_object_base_activate(bContext *C, Base *base)
void ED_object_base_select(Base *base, eObjectSelect_Mode mode)
static int object_select_random_exec(bContext *C, wmOperator *op)
static bool object_select_all_by_library_obdata(bContext *C, Library *lib)
void ED_object_base_active_refresh(Main *bmain, Scene *scene, ViewLayer *view_layer)
@ OBJECT_SELECT_LINKED_LIBRARY
@ OBJECT_SELECT_LINKED_LIBRARY_OBDATA
@ OBJECT_SELECT_LINKED_IPO
@ OBJECT_SELECT_LINKED_DUPGROUP
@ OBJECT_SELECT_LINKED_PARTICLE
@ OBJECT_SELECT_LINKED_OBDATA
@ OBJECT_SELECT_LINKED_MATERIAL
static bool select_grouped_type(bContext *C, Object *ob)
static bool object_select_all_by_library(bContext *C, Library *lib)
bool ED_object_jump_to_object(bContext *C, Object *ob, const bool UNUSED(reveal_hidden))
static bool select_grouped_keyingset(bContext *C, Object *UNUSED(ob), ReportList *reports)
static int object_select_by_type_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_select_grouped_types[]
void OBJECT_OT_select_more(wmOperatorType *ot)
static int object_select_more_exec(bContext *C, wmOperator *UNUSED(op))
Base * ED_object_find_first_by_data_id(ViewLayer *view_layer, ID *id)
void ED_pose_bone_select_tag_update(Object *ob)
bool ED_pose_deselect_all(Object *ob, int select_mode, const bool ignore_visibility)
void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_object_type_items[]
struct CollectionPointerLink * next
struct ModifierData * next
struct Collection * instance_collection
struct ParticleSystem * next
int object_type_exclude_select
struct EditBone * act_edbone
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void WM_operator_properties_select_random(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))