Currently there is a callback to flag the wmWindowManager as needing selection to sync to the outliner ED_outliner_select_sync_from_object_tag.
Using this requires us to explicitly tag on any selection change. See: D5572: Outliner synced selection refinements.
We currently have 2x function calls used when objects have been selected.
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
This task is to solve selection tagging in a more general way.
Possible solutions could be:
- Use the depsgraph tag or notifier to tag the outliner for selection syncing.
- Add a function that calls DEG_id_tag_update, WM_event_add_notifier & ED_outliner_select_sync_from_object_tag so we don't need to duplicate the same lines of code in many places.
Note, object selection is used for the purpose of discussion. Selection of other types may use a similar method.