Blender
V3.3
|
#include <cstdio>
#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.hh"
Go to the source code of this file.
Classes | |
struct | SyncSelectTypes |
struct | SelectedItems |
struct | SyncSelectActiveData |
Definition at line 200 of file outliner_sync.cc.
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().
Definition at line 75 of file outliner_sync.cc.
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.
Definition at line 63 of file outliner_sync.cc.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_ALL.
Referenced by ed_undo_refresh_for_op(), outliner_id_operation_exec(), wm_homefile_read_exec(), and wm_open_mainfile__open().
Definition at line 45 of file outliner_sync.cc.
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(), ED_armature_edit_select_pick_bone(), obedit_circle_select(), view3d_box_select_exec(), and view3d_lasso_select().
Functions for tagging outliner selection syncing is dirty from operators.
Definition at line 39 of file outliner_sync.cc.
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_object_select_pick(), 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(), object_transfer_mode_to_base(), outliner_delete_exec(), outliner_object_operation_exec(), separate_armature_exec(), separate_exec(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_collection_drop_copy_external_asset(), view3d_lasso_select(), view3d_ob_drop_copy_external_asset(), and view3d_pastebuffer_exec().
void ED_outliner_select_sync_from_outliner | ( | struct bContext * | C, |
struct SpaceOutliner * | space_outliner | ||
) |
Set clean outliner and mark other outliners for syncing.
Definition at line 338 of file outliner_sync.cc.
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().
Definition at line 51 of file outliner_sync.cc.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE.
Referenced by ed_object_select_pick(), 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(), and view3d_lasso_select().
Definition at line 57 of file outliner_sync.cc.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE.
Referenced by sequencer_de_select_all_exec(), sequencer_paste_exec(), sequencer_select_do_updates(), 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().
Definition at line 69 of file outliner_sync.cc.
References C, CTX_wm_manager(), wmWindowManager::outliner_sync_select_dirty, and WM_OUTLINER_SYNC_SELECT_FROM_ALL.
|
static |
Definition at line 522 of file outliner_sync.cc.
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 188 of file outliner_sync.cc.
References BLI_gset_haskey().
Referenced by outliner_select_sync_to_edit_bone().
Definition at line 182 of file outliner_sync.cc.
References BLI_gset_haskey().
Referenced by outliner_select_sync_to_object().
|
static |
Definition at line 194 of file outliner_sync.cc.
References BLI_gset_haskey().
Referenced by outliner_select_sync_to_pose_bone().
|
static |
Definition at line 408 of file outliner_sync.cc.
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 383 of file outliner_sync.cc.
References BASE_SELECTED, BKE_view_layer_base_find(), TreeElement::directdata, TreeStoreElem::flag, TreeStoreElem::id, TSE_ACTIVE, and TSE_SELECTED.
Referenced by outliner_sync_selection_to_outliner().
|
static |
Definition at line 429 of file outliner_sync.cc.
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 451 of file outliner_sync.cc.
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 226 of file outliner_sync.cc.
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 205 of file outliner_sync.cc.
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 257 of file outliner_sync.cc.
References add_selected_item(), bPoseChannel::bone, BONE_SELECTED, Object::data, DEG_id_tag_update(), TreeElement::directdata, Bone::flag, TreeStoreElem::flag, TreeStoreElem::id, ID_RECALC_SELECT, if(), 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 285 of file outliner_sync.cc.
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 113 of file outliner_sync.cc.
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 133 of file outliner_sync.cc.
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 532 of file outliner_sync.cc.
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 302 of file outliner_sync.cc.
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 482 of file outliner_sync.cc.
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 174 of file outliner_sync.cc.
References BLI_gset_free(), SelectedItems::edit_bones, SelectedItems::objects, and SelectedItems::pose_bones.
Referenced by ED_outliner_select_sync_from_outliner().
|
static |
Definition at line 167 of file outliner_sync.cc.
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().