[Bf-blender-cvs] [f4948d2ce7f] soc-2019-outliner: Outliner: Sync selection from outliner to sequencer

Nathan Craddock noreply at git.blender.org
Tue Jul 2 05:40:33 CEST 2019


Commit: f4948d2ce7fa5df84e51d4b07e3eb906843ea508
Author: Nathan Craddock
Date:   Mon Jul 1 21:40:03 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBf4948d2ce7fa5df84e51d4b07e3eb906843ea508

Outliner: Sync selection from outliner to sequencer

Outliner selection events now sync to the sequencer. Still need
to support active strips

===================================================================

M	source/blender/editors/space_outliner/outliner_sync.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c
index 83f5b5e473f..1390d6b921e 100644
--- a/source/blender/editors/space_outliner/outliner_sync.c
+++ b/source/blender/editors/space_outliner/outliner_sync.c
@@ -156,11 +156,39 @@ static void outliner_sync_selection_from_sequencer(ListBase *tree)
   }
 }
 
+static void outliner_sync_selection_to_sequencer(bContext *C, ListBase *tree)
+{
+  Scene *scene = CTX_data_scene(C);
+
+  for (TreeElement *te = tree->first; te; te = te->next) {
+    TreeStoreElem *tselem = TREESTORE(te);
+
+    if (tselem->type == TSE_SEQUENCE) {
+      printf("\t\tSyncing a sequence: %s\n", te->name);
+
+      Sequence *seq = (Sequence *)tselem->id;
+
+      if (tselem->flag & TSE_SELECTED) {
+        seq->flag |= SELECT;
+      }
+      else {
+        seq->flag &= ~SELECT;
+      }
+    }
+
+    outliner_sync_selection_to_sequencer(C, &te->subtree);
+  }
+
+  // DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
+  WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene);
+}
+
 /* Set clean outliner and mark other outliners for syncing */
 void outliner_select_sync(bContext *C, SpaceOutliner *soops)
 {
   puts("Outliner select... Mark other outliners as dirty for syncing");
   outliner_sync_selection_to_view_layer(C, &soops->tree);
+  outliner_sync_selection_to_sequencer(C, &soops->tree);
   sync_select_dirty_flag = SYNC_SELECT_NONE;
 
   /* Don't need to mark self as dirty here... */



More information about the Bf-blender-cvs mailing list