Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new Expansion menu button to the Hierarchy View that provides the ability to store the current Visible Set ( scene expansion, inclusions & exclusions ) as a named bookmark that is saved with the script. This makes it fairly straightforward to bookmark one or more common states for quick access.
visibleSetBookmarks.mp4
As these bookmarks are saved with the script, there is some cost in increased file size when bookmarking large expansions. For example, a bookmark expanding ~43,000 locations in the ALab results in an additional 860KB of data saved in the Gaffer script. Comparing this to bookmarking the same ~43,000 location expansion using an equivalent feature in a leading commercial DCC results in an ~11MB increase in their scene file, so we're not doing terribly by comparison... and if you were to instead bookmark an inclusion of the root of the ALab, that would only be a 1.3KB increase in the Gaffer script.
I've structured this a more generic Expansion menu with a Bookmarks submenu in case we want to add other expansion related actions here in the future ( collapse all, clear inclusions, etc ), though happy to refine if anyone has better ideas.