Various Synced Selection Fixes
These changes are mostly less obvious cases where a selection sync is needed. I did not take the time to fix or test all of these cases earlier because I first wanted the selection syncing algorithm to be reviewed and accepted before proceeding.
Sync Implementation Fixes (Committed)
- Fix syncing expecting an active object. When no active object existed, a sync would not occur in either direction.
- Fix syncing to the outliner not clearing the active flag from non-active elements. (Needed for adding a new View Layer)
- Optimize syncing to outliners by only syncing when necessary. Previously if an outliner was marked dirty it would sync, but the sequence dirty flag is not cleared unless a sync for that type occured. So if an outliner had not synced edit bones, it would attempt to sync each time it was drawn, even in object mode. The simple fix is to determine which types to sync and if a type will be synced, then proceed with syncing.
- Allow selection syncing of objects from the outliner regardless of the current interaction mode.
Fixes for various actions
- Ensure that syncs occur on changing, creating, and deleting view layers.
- Tag for syncing after changing scenes. With unique scenes, syncing already functioned as expected. When a linked copy of a scene is created, the outliner tree element selection state is maintained between the two scenes, so it is required to sync on scene changes because a scene may be a linked copy.
- Tag for syncing after creating a full copy of a scene.
- Sync selection on creating a new workspace
- Sync selection on loading a file/homefile with load UI disabled
- Sync selection on duplicating objects
- Sync selection on separate operators
- Sync selection on paste in 3D view, sequencer, and outliner.
- Sync selection on various outliner operations (object ops, drag and drop)