|
Blender
V2.93
|
#include <stdio.h>#include "DNA_armature_types.h"#include "DNA_layer_types.h"#include "DNA_outliner_types.h"#include "DNA_screen_types.h"#include "DNA_sequence_types.h"#include "DNA_space_types.h"#include "BLI_compiler_compat.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BKE_armature.h"#include "BKE_context.h"#include "BKE_layer.h"#include "BKE_main.h"#include "DEG_depsgraph.h"#include "ED_armature.h"#include "ED_object.h"#include "ED_outliner.h"#include "SEQ_select.h"#include "WM_api.h"#include "WM_types.h"#include "outliner_intern.h"Go to the source code of this file.
Classes | |
| struct | SyncSelectTypes |
| struct | SelectedItems |
| struct | SyncSelectActiveData |
Typedefs | |
| typedef struct SyncSelectTypes | SyncSelectTypes |
| typedef struct SelectedItems | SelectedItems |
| typedef struct SyncSelectActiveData | SyncSelectActiveData |
| typedef struct SelectedItems SelectedItems |
Stores items selected from a sync from the outliner. Prevents syncing the selection state of the last instance of an object linked in multiple collections.
| typedef struct SyncSelectActiveData SyncSelectActiveData |
Contains active object, bones, and sequence for syncing to prevent getting active data repeatedly throughout syncing to the outliner.
| typedef struct SyncSelectTypes SyncSelectTypes |
Outliner sync select dirty flags are not enough to determine which types to sync, outliner display mode also needs to be considered. This stores the types of data to sync to increase code clarity.
|
static |
Definition at line 217 of file outliner_sync.c.
References BLI_gset_add(), and data.
Referenced by outliner_select_sync_to_edit_bone(), outliner_select_sync_to_object(), and outliner_select_sync_to_pose_bone().
| void ED_outliner_select_sync_flag_outliners | ( | const bContext * | C | ) |
Definition at line 93 of file outliner_sync.c.
References blender::compositor::area(), C, CTX_data_main(), CTX_wm_manager(), ListBase::first, LISTBASE_FOREACH, wmWindowManager::outliner_sync_select_dirty, Main::screens, SPACE_OUTLINER, and SpaceOutliner::sync_select_dirty.
| void ED_outliner_select_sync_from_all_tag | ( | bContext * | C | ) |
Definition at line 80 of file outliner_sync.c.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_ALL.
Referenced by ed_redo_exec(), ed_undo_exec(), outliner_id_operation_exec(), wm_homefile_read_exec(), and wm_open_mainfile__open().
| void ED_outliner_select_sync_from_edit_bone_tag | ( | bContext * | C | ) |
Definition at line 62 of file outliner_sync.c.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE.
Referenced by armature_bone_primitive_add_exec(), armature_click_extrude_exec(), armature_de_select_all_exec(), armature_de_select_less_exec(), armature_de_select_more_exec(), armature_delete_selected_exec(), armature_dissolve_selected_exec(), armature_duplicate_selected_exec(), armature_extrude_exec(), armature_select_hierarchy_exec(), armature_select_linked_exec(), armature_select_linked_pick_invoke(), armature_select_mirror_exec(), armature_select_similar_exec(), armature_shortest_path_pick_invoke(), armature_subdivide_exec(), obedit_circle_select(), view3d_box_select_exec(), view3d_lasso_select(), and view3d_select_exec().
| void ED_outliner_select_sync_from_object_tag | ( | bContext * | C | ) |
Definition at line 56 of file outliner_sync.c.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_OBJECT.
Referenced by bone_select_menu_exec(), collection_duplicate_exec(), collection_hierarchy_delete_exec(), collection_objects_select_exec(), do_outliner_item_editmode_toggle(), do_outliner_item_mode_toggle_generic(), do_outliner_item_posemode_toggle(), duplicate_exec(), ED_object_add_type_with_obdata(), ED_text_to_object(), edbm_separate_exec(), gpencil_stroke_separate_exec(), object_add_named_exec(), object_duplicates_make_real_exec(), object_select_all_exec(), object_select_by_type_exec(), object_select_grouped_exec(), object_select_less_exec(), object_select_linked_exec(), object_select_menu_exec(), object_select_mirror_exec(), object_select_more_exec(), object_select_random_exec(), object_select_same_collection_exec(), outliner_delete_exec(), outliner_object_operation_exec(), separate_armature_exec(), separate_exec(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select(), view3d_pastebuffer_exec(), and view3d_select_exec().
| void ED_outliner_select_sync_from_outliner | ( | bContext * | C, |
| SpaceOutliner * | space_outliner | ||
| ) |
Definition at line 356 of file outliner_sync.c.
References C, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), SyncSelectTypes::edit_bone, ELEM, SpaceOutliner::flag, Scene::id, ID_RECALC_SELECT, NA_SELECTED, NC_SCENE, ND_OB_SELECT, ND_SEQUENCER, SyncSelectTypes::object, outliner_sync_select_from_outliner_set_types(), outliner_sync_selection_from_outliner(), SpaceOutliner::outlinevis, SyncSelectTypes::pose_bone, scene, selected_items_free(), selected_items_init(), SyncSelectTypes::sequence, SO_DATA_API, SO_ID_ORPHANS, SO_LIBRARIES, SO_OVERRIDES_LIBRARY, SO_SYNC_SELECT, SpaceOutliner::sync_select_dirty, SpaceOutliner::tree, WM_event_add_notifier(), WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE, WM_OUTLINER_SYNC_SELECT_FROM_OBJECT, WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE, and WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE.
Referenced by do_outliner_operation_event(), merged_element_search_exec_fn(), outliner_box_select_exec(), outliner_item_do_activate_from_cursor(), outliner_item_drag_drop_invoke(), outliner_select_all_exec(), and outliner_walk_select_invoke().
| void ED_outliner_select_sync_from_pose_bone_tag | ( | bContext * | C | ) |
Definition at line 68 of file outliner_sync.c.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE.
Referenced by pose_de_select_all_exec(), pose_group_deselect_exec(), pose_group_select_exec(), pose_select_connected_invoke(), pose_select_constraint_target_exec(), pose_select_grouped_exec(), pose_select_hierarchy_exec(), pose_select_linked_exec(), pose_select_mirror_exec(), pose_select_parent_exec(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select(), and view3d_select_exec().
| void ED_outliner_select_sync_from_sequence_tag | ( | bContext * | C | ) |
Definition at line 74 of file outliner_sync.c.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE.
Referenced by sequencer_box_select_exec(), sequencer_de_select_all_exec(), sequencer_paste_exec(), sequencer_select_exec(), sequencer_select_grouped_exec(), sequencer_select_handles_exec(), sequencer_select_inverse_exec(), sequencer_select_less_exec(), sequencer_select_linked_exec(), sequencer_select_linked_pick_invoke(), sequencer_select_more_exec(), sequencer_select_side_exec(), and sequencer_select_side_of_frame_exec().
| bool ED_outliner_select_sync_is_dirty | ( | const bContext * | C | ) |
Definition at line 86 of file outliner_sync.c.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_ALL.
|
static |
Definition at line 540 of file outliner_sync.c.
References C, CTX_data_active_bone(), CTX_data_active_pose_bone(), CTX_data_scene(), CTX_data_view_layer(), SyncSelectActiveData::edit_bone, OBACT, SyncSelectActiveData::object, SyncSelectActiveData::pose_channel, scene, SEQ_select_active_get(), and SyncSelectActiveData::sequence.
Referenced by outliner_sync_selection().
Definition at line 205 of file outliner_sync.c.
References BLI_gset_haskey().
Referenced by outliner_select_sync_to_edit_bone().
Definition at line 199 of file outliner_sync.c.
References BLI_gset_haskey().
Referenced by outliner_select_sync_to_object().
|
static |
Definition at line 211 of file outliner_sync.c.
References BLI_gset_haskey().
Referenced by outliner_select_sync_to_pose_bone().
|
static |
Definition at line 426 of file outliner_sync.c.
References BONE_SELECTED, TreeElement::directdata, EditBone::flag, TreeStoreElem::flag, if(), TSE_ACTIVE, and TSE_SELECTED.
Referenced by outliner_sync_selection_to_outliner().
|
static |
Definition at line 401 of file outliner_sync.c.
References BASE_SELECTED, BKE_view_layer_base_find(), TreeElement::directdata, TreeStoreElem::flag, TreeStoreElem::id, NULL, TSE_ACTIVE, and TSE_SELECTED.
Referenced by outliner_sync_selection_to_outliner().
|
static |
Definition at line 447 of file outliner_sync.c.
References bPoseChannel::bone, BONE_SELECTED, TreeElement::directdata, TreeStoreElem::flag, if(), TSE_ACTIVE, and TSE_SELECTED.
Referenced by outliner_sync_selection_to_outliner().
|
static |
Definition at line 469 of file outliner_sync.c.
References TreeStoreElem::flag, Sequence::flag, TreeStoreElem::id, if(), SELECT, TSE_ACTIVE, and TSE_SELECTED.
Referenced by outliner_sync_selection_to_outliner().
|
static |
Definition at line 243 of file outliner_sync.c.
References add_selected_item(), BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, DEG_id_tag_update(), TreeElement::directdata, EBONE_SELECTABLE, ED_armature_ebone_select_set(), TreeStoreElem::flag, bArmature::id, TreeStoreElem::id, ID_RECALC_SELECT, is_edit_bone_selected(), NC_OBJECT, ND_BONE_SELECT, OBEDIT_FROM_VIEW_LAYER, TSE_SELECTED, and WM_main_add_notifier().
Referenced by outliner_sync_selection_from_outliner().
|
static |
Definition at line 222 of file outliner_sync.c.
References add_selected_item(), BA_DESELECT, BA_SELECT, BASE_SELECTABLE, BKE_view_layer_base_find(), TreeElement::directdata, ED_object_base_select(), TreeStoreElem::flag, TreeStoreElem::id, is_object_selected(), and TSE_SELECTED.
Referenced by outliner_sync_selection_from_outliner().
|
static |
Definition at line 274 of file outliner_sync.c.
References add_selected_item(), BONE_SELECTED, Object::data, DEG_id_tag_update(), TreeElement::directdata, TreeStoreElem::flag, TreeStoreElem::id, ID_RECALC_SELECT, is_pose_bone_selected(), NC_OBJECT, ND_BONE_SELECT, PBONE_SELECTABLE, TSE_SELECTED, and WM_main_add_notifier().
Referenced by outliner_sync_selection_from_outliner().
|
static |
Definition at line 302 of file outliner_sync.c.
References TreeStoreElem::flag, Sequence::flag, TreeStoreElem::id, if(), scene, SELECT, SEQ_select_active_set(), TSE_ACTIVE, and TSE_SELECTED.
Referenced by outliner_sync_selection_from_outliner().
|
static |
Set which types of data to sync when syncing selection from the outliner based on object interaction mode and outliner display mode
Definition at line 130 of file outliner_sync.c.
References C, SyncSelectTypes::edit_bone, Object::mode, OB_ARMATURE, TreeViewContext::ob_edit, OB_MODE_POSE, TreeViewContext::ob_pose, SyncSelectTypes::object, outliner_viewcontext_init(), SpaceOutliner::outlinevis, SyncSelectTypes::pose_bone, SyncSelectTypes::sequence, SO_SEQUENCE, and Object::type.
Referenced by ED_outliner_select_sync_from_outliner().
|
static |
Current dirty flags and outliner display mode determine which type of syncing should occur. This is to ensure sync flag data is not lost on sync in the wrong display mode. Returns true if a sync is needed.
Definition at line 150 of file outliner_sync.c.
References C, SyncSelectTypes::edit_bone, Object::mode, OB_ARMATURE, TreeViewContext::ob_edit, OB_MODE_POSE, TreeViewContext::ob_pose, SyncSelectTypes::object, outliner_viewcontext_init(), SpaceOutliner::outlinevis, SyncSelectTypes::pose_bone, SyncSelectTypes::sequence, SO_SEQUENCE, SpaceOutliner::sync_select_dirty, Object::type, WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE, WM_OUTLINER_SYNC_SELECT_FROM_OBJECT, WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE, and WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE.
Referenced by outliner_sync_selection().
| void outliner_sync_selection | ( | const bContext * | C, |
| SpaceOutliner * | space_outliner | ||
| ) |
Definition at line 551 of file outliner_sync.c.
References C, CTX_data_view_layer(), SyncSelectTypes::edit_bone, get_sync_select_active_data(), SyncSelectTypes::object, outliner_sync_select_to_outliner_set_types(), outliner_sync_selection_to_outliner(), SyncSelectTypes::pose_bone, SyncSelectTypes::sequence, SpaceOutliner::sync_select_dirty, SpaceOutliner::tree, WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE, WM_OUTLINER_SYNC_SELECT_FROM_OBJECT, WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE, and WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE.
|
static |
Sync select and active flags from outliner to active view layer, bones, and sequencer.
Definition at line 319 of file outliner_sync.c.
References SyncSelectTypes::edit_bone, SelectedItems::edit_bones, ID_OB, LISTBASE_FOREACH, SyncSelectTypes::object, SelectedItems::objects, outliner_select_sync_to_edit_bone(), outliner_select_sync_to_object(), outliner_select_sync_to_pose_bone(), outliner_select_sync_to_sequence(), SyncSelectTypes::pose_bone, SelectedItems::pose_bones, scene, SyncSelectTypes::sequence, tree, TREESTORE, TSE_EBONE, TSE_POSE_CHANNEL, TSE_SEQUENCE, TSE_SOME_ID, and TreeStoreElem::type.
Referenced by ED_outliner_select_sync_from_outliner().
|
static |
Sync select and active flags from active view layer, bones, and sequences to the outliner.
Definition at line 500 of file outliner_sync.c.
References SyncSelectTypes::edit_bone, SyncSelectActiveData::edit_bone, TreeStoreElem::flag, ID_OB, LISTBASE_FOREACH, SyncSelectTypes::object, SyncSelectActiveData::object, outliner_select_sync_from_edit_bone(), outliner_select_sync_from_object(), outliner_select_sync_from_pose_bone(), outliner_select_sync_from_sequence(), SyncSelectTypes::pose_bone, SyncSelectActiveData::pose_channel, SyncSelectTypes::sequence, SyncSelectActiveData::sequence, tree, TREESTORE, TSE_ACTIVE, TSE_EBONE, TSE_POSE_CHANNEL, TSE_SELECTED, TSE_SEQUENCE, TSE_SOME_ID, and TreeStoreElem::type.
Referenced by outliner_sync_selection().
|
static |
Definition at line 191 of file outliner_sync.c.
References BLI_gset_free(), SelectedItems::edit_bones, NULL, SelectedItems::objects, and SelectedItems::pose_bones.
Referenced by ED_outliner_select_sync_from_outliner().
|
static |
Definition at line 184 of file outliner_sync.c.
References BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_gset_new(), SelectedItems::edit_bones, SelectedItems::objects, and SelectedItems::pose_bones.
Referenced by ED_outliner_select_sync_from_outliner().