[Bf-blender-cvs] [a336b0c3a1c] soc-2020-outliner: Cleanup: Remove unused outliner select code
Nathan Craddock
noreply at git.blender.org
Tue Aug 18 23:51:42 CEST 2020
Commit: a336b0c3a1cded0b5b1e4a8f24306fdad7dda1b7
Author: Nathan Craddock
Date: Tue Aug 18 15:06:45 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rBa336b0c3a1cded0b5b1e4a8f24306fdad7dda1b7
Cleanup: Remove unused outliner select code
No functional changes.
===================================================================
M source/blender/editors/space_outliner/outliner_intern.h
M source/blender/editors/space_outliner/outliner_select.c
M source/blender/editors/space_outliner/outliner_tools.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 324fc4df295..4e6e9412292 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -297,11 +297,6 @@ void outliner_item_mode_toggle(struct bContext *C,
TreeElement *te,
const bool extend);
-void outliner_set_active_data(struct bContext *C,
- TreeViewContext *tvc,
- TreeElement *te,
- struct TreeStoreElem *tselem);
-
/* outliner_edit.c ---------------------------------------------- */
typedef void (*outliner_operation_fn)(struct bContext *C,
struct ReportList *,
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 143c4acb914..e2520d34157 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1378,54 +1378,6 @@ static void outliner_set_properties_tab(bContext *C, TreeElement *te, TreeStoreE
}
}
-/* TODO (Nathan): Temporary while testing */
-static void outliner_set_active_camera(bContext *C, Scene *scene, TreeStoreElem *tselem)
-{
- Object *ob = (Object *)tselem->id;
-
- scene->camera = ob;
- Main *bmain = CTX_data_main(C);
- wmWindowManager *wm = bmain->wm.first;
-
- WM_windows_scene_data_sync(&wm->windows, scene);
- DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
- DEG_relations_tag_update(bmain);
- WM_event_add_notifier(C, NC_SCENE | NA_EDITED, NULL);
-}
-
-/* TODO (Nathan): Remove */
-void outliner_set_active_data(bContext *C,
- TreeViewContext *tvc,
- TreeElement *te,
- TreeStoreElem *tselem)
-{
- if (tselem->type == 0 && te->idcode == ID_OB) {
- Object *ob = (Object *)tselem->id;
- if (ob->type == OB_CAMERA) {
- outliner_set_active_camera(C, tvc->scene, tselem);
- }
- }
- else if (tselem->type == 0 && te->idcode == ID_SCE) {
- Scene *scene = (Scene *)tselem->id;
- if (scene != tvc->scene) {
- WM_window_set_active_scene(CTX_data_main(C), C, CTX_wm_window(C), scene);
- }
- }
- else if (tselem->type == TSE_VIEW_COLLECTION_BASE) {
- ViewLayer *view_layer = CTX_data_view_layer(C);
- LayerCollection *layer_collection = view_layer->layer_collections.first;
- BKE_layer_collection_activate(view_layer, layer_collection);
- WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
- }
- else if (tselem->type == TSE_LAYER_COLLECTION) {
- Scene *scene = CTX_data_scene(C);
- LayerCollection *layer_collection = te->directdata;
- ViewLayer *view_layer = BKE_view_layer_find_from_collection(scene, layer_collection);
- BKE_layer_collection_activate(view_layer, layer_collection);
- WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
- }
-}
-
/* ================================================ */
/**
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 108fb9daaa7..4a13535438e 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -2597,10 +2597,6 @@ static int do_outliner_operation_event(bContext *C,
outliner_flag_set(&space_outliner->tree, clear_flag, false);
tselem->flag |= TSE_SELECTED | TSE_ACTIVE;
- /* Only redraw, don't rebuild here because TreeElement pointers will
- * become invalid and operations will crash. */
- ED_region_tag_redraw_no_rebuild(region);
- ED_outliner_select_sync_from_outliner(C, space_outliner);
/* Only redraw, don't rebuild here because TreeElement pointers will
* become invalid and operations will crash. */
ED_region_tag_redraw_no_rebuild(region);
More information about the Bf-blender-cvs
mailing list