129 bool changed =
false;
165 const int active_mode = tvc->
obact->
mode;
170 if (base_active != base) {
188 const bool do_extend)
242 for (base =
FIRSTBASE(view_layer); base; base = base->
next) {
268 for (ebone = ebone_parent->
next; ebone; ebone = ebone->
next) {
315 if (sce &&
scene != sce) {
443 if (sce &&
scene != sce) {
496 uint objects_len = 0;
499 for (
uint object_index = 0; object_index < objects_len; object_index++) {
524 arm->act_bone = pchan->bone;
554 bone_iter = bone_iter->next) {
601 view_layer,
NULL, &bases_len);
741 const bool handle_all_types)
748 if (handle_all_types) {
775 switch (tselem->
type) {
847 if (ob && ob->data == arm) {
902 if (ob == ob_pose && ob->
pose) {
1080 switch (tselem->
type) {
1195 switch (tselem->
type) {
1350 const bool recursive,
1351 const bool do_activate_data)
1363 else if (do_activate_data) {
1374 if (do_activate_data ==
false) {
1426 else if (do_activate_data) {
1436 const short select_flag)
1486 selecting = !selecting;
1557 const float view_mval[2])
1574 const bool use_range,
1575 const bool deselect_all)
1581 bool changed =
false, rebuild_tree =
false;
1605 bool merged_elements =
false;
1606 bool is_over_icon =
false;
1608 space_outliner, te, view_mval[0], &merged_elements, &is_over_icon);
1611 if (merged_elements) {
1669 ot->
idname =
"OUTLINER_OT_item_activate";
1670 ot->
description =
"Handle mouse clicks to select and activate items";
1681 ot->
srna,
"extend_range",
false,
"Extend Range",
"Select a range from active element");
1687 "Deselect On Nothing",
1688 "Deselect all when nothing under the cursor");
1754 ®ion->
v2d, event->
mval[0], event->
mval[1], &view_mval[0], &view_mval[1]);
1775 ot->
idname =
"OUTLINER_OT_select_box";
1776 ot->
description =
"Use box selection to select tree elements";
1793 ot->
srna,
"tweak",
false,
"Tweak",
"Tweak gesture from empty space for box selection");
1837 while (successor->
parent) {
1842 successor = successor->
parent;
1856 else if (te->
next) {
1876 else if (!toggle_all && te->
parent) {
1902 const int direction,
1904 const bool toggle_all)
1908 switch (direction) {
1949 active_te = active_te->
parent;
1965 if (te->
ys > y_max) {
1968 else if (te->
ys < y_min) {
2007 ot->
name =
"Walk Select";
2008 ot->
idname =
"OUTLINER_OT_select_walk";
2009 ot->
description =
"Use walk navigation to select tree elements";
2023 ot->
srna,
"toggle_all",
false,
"Toggle All",
"Toggle open/close hierarchy");
#define PBONE_SELECTABLE(arm, bone)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
void BKE_constraint_panel_expand(struct bConstraint *con)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
struct SpaceOutliner * CTX_wm_space_outliner(const bContext *C)
struct LayerCollection * CTX_data_layer_collection(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ReportList * CTX_wm_reports(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
void BKE_gpencil_modifier_panel_expand(struct GpencilModifierData *md)
struct ViewLayer * BKE_view_layer_find_from_collection(const struct Scene *scene, struct LayerCollection *lc)
bool BKE_layer_collection_activate(struct ViewLayer *view_layer, struct LayerCollection *lc)
void BKE_view_layer_base_deselect_all(struct ViewLayer *view_layer)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
#define BKE_view_layer_array_from_bases_in_edit_mode_unique_data(view_layer, v3d, r_len)
void BKE_view_layer_base_select_and_set_active(struct ViewLayer *view_layer, struct Base *selbase)
void BKE_modifier_panel_expand(struct ModifierData *md)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_child_recursive(const struct Object *ob_parent, const struct Object *ob_child)
struct Object * BKE_object_pose_armature_get(struct Object *ob)
bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode)
void BKE_object_modifier_set_active(struct Object *ob, struct ModifierData *md)
struct ModifierData * BKE_object_active_modifier(const struct Object *ob)
struct Object ** BKE_object_pose_array_get_unique(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
bool BKE_object_is_in_editmode(const struct Object *ob)
struct ParticleSystem * psys_get_current(struct Object *ob)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_shaderfx_panel_expand(struct ShaderFxData *fx)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_LINKED(_id)
Object groups, one object can be in many groups at once.
@ eModifierType_ParticleSystem
@ eModifierType_Collision
@ eModifierType_DynamicPaint
Object is a sort of wrapper for general info.
#define OB_TYPE_SUPPORT_EDITMODE(_type)
@ TSE_VIEW_COLLECTION_BASE
@ TSE_GPENCIL_EFFECT_BASE
#define FIRSTBASE(_view_layer)
#define OBACT(_view_layer)
@ BCONTEXT_BONE_CONSTRAINT
#define EBONE_SELECTABLE(arm, ebone)
void ED_object_base_activate_with_mode_exit_if_needed(struct bContext *C, struct Base *base)
void ED_object_mode_generic_exit(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode)
bool ED_object_editmode_exit_ex(struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag)
bool ED_object_editmode_enter_ex(struct Main *bmain, struct Scene *scene, struct Object *ob, int flag)
bool ED_object_mode_set(struct bContext *C, eObjectMode mode)
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
void ED_outliner_select_sync_from_outliner(struct bContext *C, struct SpaceOutliner *space_outliner)
void ED_region_tag_redraw_no_rebuild(struct ARegion *region)
bool ED_operator_outliner_active(struct bContext *C)
void ED_region_tag_redraw(struct ARegion *region)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
void ED_sequencer_deselect_all(struct Scene *scene)
void ED_undo_group_begin(struct bContext *C)
void ED_undo_push(struct bContext *C, const char *str)
void ED_undo_group_end(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.
StructRNA RNA_ParticleSystem
void UI_view2d_region_to_view_rctf(const struct View2D *v2d, const struct rctf *rect_src, struct rctf *rect_dst) ATTR_NONNULL()
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
#define NS_LAYER_COLLECTION
bool ED_armature_edit_deselect_all_multi_ex(struct Base **bases, uint bases_len)
bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebone_child)
void ED_armature_ebone_select_set(EditBone *ebone, bool select)
void activate(bool forceActivation=false) const
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool active
all scheduled work for the GPU.
void outliner_item_openclose(SpaceOutliner *space_outliner, TreeElement *te, bool open, bool toggle_all)
bool outliner_flag_set(ListBase *lb, short flag, short set)
void outliner_viewcontext_init(const struct bContext *C, TreeViewContext *tvc)
TreeElement * outliner_find_element_with_flag(const ListBase *lb, short flag)
bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_co_x)
void outliner_scroll_view(struct SpaceOutliner *space_outliner, struct ARegion *region, int delta_y)
bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x)
TreeElement * outliner_search_back_te(TreeElement *te, short idcode)
float outliner_restrict_columns_width(const struct SpaceOutliner *space_outliner)
TreeElement * outliner_find_item_at_y(const SpaceOutliner *space_outliner, const ListBase *tree, float view_co_y)
bool outliner_is_element_visible(const TreeElement *te)
struct ID * outliner_search_back(TreeElement *te, short idcode)
#define TSELEM_OPEN(telm, sv)
TreeElement * outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner, TreeElement *parent_te, float view_co_x, bool *r_is_merged_icon, bool *r_is_over_icon)
void outliner_tag_redraw_avoid_rebuild_on_open_change(const struct SpaceOutliner *space_outliner, struct ARegion *region)
void merged_element_search_menu_invoke(struct bContext *C, TreeElement *parent_te, TreeElement *activate_te)
static int outliner_walk_select_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void do_outliner_ebone_select_recursive(bArmature *arm, EditBone *ebone_parent, bool select)
static eOLDrawState tree_element_viewlayer_state_get(const bContext *C, const TreeElement *te)
static void tree_element_camera_activate(bContext *C, Scene *scene, TreeElement *te)
void outliner_item_mode_toggle(bContext *C, TreeViewContext *tvc, TreeElement *te, const bool do_extend)
static eOLDrawState tree_element_posegroup_state_get(const ViewLayer *view_layer, const TreeElement *te, const TreeStoreElem *tselem)
static void do_outliner_item_mode_toggle_generic(bContext *C, TreeViewContext *tvc, Base *base)
static void tree_element_master_collection_activate(const bContext *C)
static void do_outliner_item_editmode_toggle(bContext *C, Scene *scene, Base *base)
static eOLDrawState tree_element_active_world_get(const Scene *scene, const TreeElement *te)
static bool outliner_is_co_within_restrict_columns(const SpaceOutliner *space_outliner, const ARegion *region, float view_co_x)
static eOLDrawState tree_element_defgroup_state_get(const ViewLayer *view_layer, const TreeElement *te, const TreeStoreElem *tselem)
static TreeElement * outliner_find_next_element(SpaceOutliner *space_outliner, TreeElement *te)
static TreeElement * outliner_find_previous_element(SpaceOutliner *space_outliner, TreeElement *te)
static eOLDrawState tree_element_ebone_state_get(const TreeElement *te)
void tree_element_activate(bContext *C, const TreeViewContext *tvc, TreeElement *te, const eOLSetState set, const bool handle_all_types)
static bool do_outliner_range_select_recursive(ListBase *lb, TreeElement *active, TreeElement *cursor, bool selecting)
static void outliner_item_box_select(bContext *C, SpaceOutliner *space_outliner, Scene *scene, rctf *rectf, TreeElement *te, bool select)
static int outliner_item_do_activate_from_cursor(bContext *C, const int mval[2], const bool extend, const bool use_range, const bool deselect_all)
static eOLDrawState tree_element_object_state_get(const TreeViewContext *tvc, const TreeStoreElem *tselem)
static int outliner_box_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void tree_element_world_activate(bContext *C, Scene *scene, TreeElement *te)
eOLDrawState tree_element_active_state_get(const TreeViewContext *tvc, const TreeElement *te, const TreeStoreElem *tselem)
static void do_outliner_item_posemode_toggle(bContext *C, Scene *scene, Base *base)
void OUTLINER_OT_select_walk(wmOperatorType *ot)
static TreeElement * outliner_element_find_successor_in_parents(TreeElement *te)
static void tree_element_object_activate(bContext *C, Scene *scene, ViewLayer *view_layer, TreeElement *te, const eOLSetState set, bool recursive)
static eOLDrawState tree_element_pose_state_get(const ViewLayer *view_layer, const TreeStoreElem *tselem)
static eOLDrawState tree_element_gplayer_state_get(const TreeElement *te)
static TreeElement * do_outliner_select_walk(SpaceOutliner *space_outliner, TreeElement *te, const int direction, const bool extend, const bool toggle_all)
static void do_outliner_range_select(bContext *C, SpaceOutliner *space_outliner, TreeElement *cursor, const bool extend)
static void tree_element_bone_activate(bContext *C, ViewLayer *view_layer, TreeElement *te, TreeStoreElem *tselem, const eOLSetState set, bool recursive)
static TreeElement * outliner_find_rightmost_visible_child(SpaceOutliner *space_outliner, TreeElement *te)
static void do_outliner_object_select_recursive(ViewLayer *view_layer, Object *ob_parent, bool select)
void outliner_item_select(bContext *C, SpaceOutliner *space_outliner, TreeElement *te, const short select_flag)
static void tree_element_viewlayer_activate(bContext *C, TreeElement *te)
static void outliner_sync_to_properties_editors(const bContext *C, PointerRNA *ptr, const int context)
void tree_element_type_active_set(bContext *C, const TreeViewContext *tvc, TreeElement *te, TreeStoreElem *tselem, const eOLSetState set, bool recursive)
static eOLDrawState tree_element_posechannel_state_get(const Object *ob_pose, const TreeElement *te, const TreeStoreElem *tselem)
void OUTLINER_OT_item_activate(wmOperatorType *ot)
static void do_outliner_bone_select_recursive(bArmature *arm, Bone *bone_parent, bool select)
static void tree_element_modifier_activate(bContext *C, TreeElement *te, TreeStoreElem *tselem, const eOLSetState set)
static void tree_element_material_activate(bContext *C, ViewLayer *view_layer, TreeElement *te)
static bool outliner_is_co_within_active_mode_column(bContext *C, SpaceOutliner *space_outliner, const float view_mval[2])
static int outliner_item_activate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static eOLDrawState tree_element_active_scene_get(const TreeViewContext *tvc, const TreeElement *te, const TreeStoreElem *tselem)
static TreeElement * outliner_walk_right(SpaceOutliner *space_outliner, TreeElement *te, bool toggle_all)
static void tree_element_constraint_activate(bContext *C, ViewLayer *view_layer, TreeElement *te, TreeStoreElem *tselem, const eOLSetState set)
static void tree_element_psys_activate(bContext *C, TreeStoreElem *tselem)
static void tree_element_gplayer_activate(bContext *C, TreeElement *te, TreeStoreElem *tselem)
static TreeElement * outliner_walk_left(SpaceOutliner *space_outliner, TreeElement *te, bool toggle_all)
static eOLDrawState tree_element_active_material_get(const ViewLayer *view_layer, const TreeElement *te)
static void tree_element_posegroup_activate(bContext *C, TreeElement *te, TreeStoreElem *tselem)
bPoseChannel * outliner_find_parent_bone(TreeElement *te, TreeElement **r_bone_te)
static void tree_element_active_ebone__sel(bContext *C, bArmature *arm, EditBone *ebone, short sel)
static eOLDrawState tree_element_bone_state_get(const ViewLayer *view_layer, const TreeElement *te, const TreeStoreElem *tselem)
static void outliner_walk_scroll(SpaceOutliner *space_outliner, ARegion *region, TreeElement *te)
static void outliner_set_properties_tab(bContext *C, TreeElement *te, TreeStoreElem *tselem)
static eOLDrawState tree_element_modifier_state_get(const TreeElement *te, const TreeStoreElem *tselem)
eOLDrawState tree_element_type_active_state_get(const bContext *C, const TreeViewContext *tvc, const TreeElement *te, const TreeStoreElem *tselem)
static void tree_element_sequence_dup_activate(Scene *scene, TreeElement *UNUSED(te))
static void tree_element_layer_collection_activate(bContext *C, TreeElement *te)
static void do_outliner_item_activate_tree_element(bContext *C, const TreeViewContext *tvc, SpaceOutliner *space_outliner, TreeElement *te, TreeStoreElem *tselem, const bool extend, const bool recursive, const bool do_activate_data)
static eOLDrawState tree_element_layer_collection_state_get(const bContext *C, const TreeElement *te)
static eOLDrawState tree_element_active_camera_get(const Scene *scene, const TreeElement *te)
static eOLDrawState tree_element_sequence_state_get(const Scene *scene, const TreeElement *te)
bool outliner_is_co_within_mode_column(SpaceOutliner *space_outliner, const float view_mval[2])
static void tree_element_defgroup_activate(bContext *C, TreeElement *te, TreeStoreElem *tselem)
void OUTLINER_OT_select_box(wmOperatorType *ot)
static void tree_element_posechannel_activate(bContext *C, ViewLayer *view_layer, TreeElement *te, TreeStoreElem *tselem, const eOLSetState set, bool recursive)
static TreeElement * find_walk_select_start_element(SpaceOutliner *space_outliner, bool *changed)
static void tree_element_ebone_activate(bContext *C, ViewLayer *view_layer, TreeElement *te, TreeStoreElem *tselem, const eOLSetState set, bool recursive)
static eOLDrawState tree_element_master_collection_state_get(const bContext *C)
static void tree_element_sequence_activate(bContext *C, Scene *scene, TreeElement *te, const eOLSetState set)
static eOLDrawState tree_element_sequence_dup_state_get(const TreeElement *te)
static int outliner_box_select_exec(bContext *C, wmOperator *op)
bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob)
bool ED_object_posemode_exit_ex(struct Main *bmain, Object *ob)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
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)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
struct SELECTID_Context context
Editing * SEQ_editing_get(Scene *scene, bool alloc)
void SEQ_select_active_set(Scene *scene, Sequence *seq)
struct ToolSettings * toolsettings
struct TreeElement * parent
struct TreeElement * prev
struct TreeElement * next
struct ViewLayer * view_layer
ListBase layer_collections
struct EditBone * act_edbone
struct bPoseChannel * next
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_select_walk_direction(wmOperatorType *ot)
void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect)
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
void WM_window_set_active_view_layer(wmWindow *win, ViewLayer *view_layer)
void WM_windows_scene_data_sync(const ListBase *win_lb, Scene *scene)
Scene * WM_window_get_active_scene(const wmWindow *win)