Search Tips

Search is based on keyword.

`Ex: "Procedures"`

Do not search with natural language

`Ex: "How do I write a new procedure?"`

Give Feedback Support Portal

# Working Sets

Working Sets provide a flexible way to work with particular locations and branches of a scene graph.

The main purpose of Working Sets is to decouple the expansion and selection states of scene graph locations in the Scene Graph tab from what's being drawn in the Viewer tab and from what's being rendered when rendering. Traditionally in Katana, the Viewer tab was closely linked to the Scene Graph tab. through the ScenegraphManager Python module, which maintained a global expansion and selection state for the whole application. The Viewer displayed geometry of locations that were expanded in the Scene Graph tab, and you could choose a sub-set of objects to be rendered using the Render Selected Objects Only option. The expansion and selection states were therefore critical to an artist's workflow. The main purpose of Working Sets is to decouple the expansion and selection states of scene graph locations in the Scene Graph tab from what's being drawn in the Viewer tab and from what's being rendered when rendering. Working Sets also provide a reusable API for similar cases that need a definable set of target locations in the UI.

Working Sets are intended to allow artists to inspect a scene in the Scene Graph tab by expanding and collapsing branches at will, without incurring draw operations in the Viewer tab or render updates when Live Rendering. Artists are to be able to add and remove scene graph locations to and from specific Working Sets, and to use specific Working Sets in relevant UI operations.

Technically speaking, a Working Set is a set of scene graph locations for which membership is defined by a set of location states. There are four explicit states: Included, Included with Children, Excluded, and Excluded with Children. A scene graph location is a member of a Working Set if it is explicitly included or if it inherits inclusion from an ancestor that is Included with Children and is not explicitly excluded and does not inherit exclusion from an ancestor that is Excluded with Children. Working Sets are independent of the existence of scene graph locations, and their expansion states.

Working Sets provide the ability to work with particular locations and branches of a scene graph with much more flexibility than is afforded by scene graph expansion, pinning, and selection. For example, a Working Set can be used to control which objects to render in Preview Renders and Live Renders. You can specify which scene graph locations are part of that Working Set in the Render column of the Scene Graph tab.

Note: You can disable the Working Sets UI elements, including the Viewer Visibility and Render columns in the Scene Graph tab and the corresponding buttons in the Viewer and Monitor tabs, by setting the KATANA_DISABLE_WORKING_SETS_UI environment variable to 1.

## Working Sets in Scene Graph Tab

The Scene Graph tab contains columns for defining which locations to include or exclude in specific pre-defined Working Sets that are built into Katana:

Column | Description
--- | ---
Viewer Visibility | Controls which objects to show in the Viewer tab.
Render | Controls which objects to render in Preview Renders and Live Renders.
Live Render Updates | Controls which objects trigger updates during a Live Render.

Screenshot of the Scene Graph tab showing various location states set for various locations in the pre-defined Working Set columns.

The states of scene graph locations in each Working Set are represented by icons in the corresponding Working Set column. The following table lists the icons that are used and the location states they represent:

Icon | Description
--- | ---
- Empty | The location is neither explicitly included nor excluded in the Working Set, meaning it is not part of the Working Set.
- Included | The location is explicitly included in the Working Set.
- Included with Children | The location and all of its children are included in the Working Set, except those that are explicitly excluded.
- Excluded | The location is explicitly excluded from the Working Set.
- Excluded with Children | The location and all of its children are excluded from the Working Set, except those that are explicitly included.
- Included by inheritance | The location is included in the Working Set because one of its ancestors is Included with Children.
- Excluded by inheritance | The location is excluded from the Working Set because one of its ancestors is Excluded with Children.

In addition to the above icons, the following icon decorations are used to indicate location states of children and/or restrictions on the states that a location is permitted to have:

Icon Decoration | Description
--- | ---
- Children included | Children of the location are explicitly included in the Working Set.
- Children excluded | Children of the location are explicitly excluded from the Working Set.
- States restricted | Only certain states are allowed to be set for the location.

## Interacting with Working Sets

Three pre-defined Working Sets can be manipulated through their columns in the Scene Graph tab: the Viewer Visibility Working Set, the Render Working Set, and the Live Render Updates Working Set.

### Viewer Visibility Working Set

The Viewer Visibility column allows you to interact with the Viewer Visibility Working Set that controls the visibility of objects in the Viewer tab. When the Viewer Visibility column is turned off, the Viewer displays locations depending on the scene graph expansion and pinned locations. When it is turned on, it displays locations included in the Working Set. You can turn on the Viewer Visibility Working Set by clicking on the Viewer Visibility icon, either in the Scene Graph or Viewer tab. You can create arbitrary hierarchies of included and excluded scene graph branches. For example, you can include one location with all but one of its children.

You can also directly select an object in the Viewer tab and set a Working Set location state for it. Simply select one or more objects, then right-click and select a state from the menu.

The Viewer tab works in two modes:

• Scene graph expansion - visibility depends on scene graph expansion state and pinned locations.

• Visibility Working Set - locations included in the Visibility Working Set.

Note: While the Viewer is following the Viewer Visibility Working Set (Viewer Visibility column is turned on), proxies and bounds are displayed only on leaf locations as defined by the Working Set, regardless of the existence of any child locations. Such leaf locations are directly set as Included, have no explicitly included children, and do not inherit inclusion. This allows proxy visibility to be determined without the need to cook child locations.

### Render Working Set

The Render column allows you to interact with the Render Working Set that controls which locations are rendered in Interactive Renders. You can turn on the Render Working Set by clicking on the Render icon, either in the Scene Graph or Monitor tab.

Note: If the Render Only Selected Objects toggle is turned on and the Render Working Set is enabled, only locations that are both selected and contained in the Render Working Set are rendered. For more information, refer to Rendering only Selected Locations.

### Live Render Updates Working Set

The Live Render Updates column allows you to interact with the Live Render Updates Working Set that controls for which locations updates are sent to the renderer when Live Rendering.

The /root location is always included, as Live Rendering requires updates to its attributes, notably liveRenderSettings, to be communicated to the renderer plug-in. The small blue lock in the icon indicates that only some of the available location states can be set for the corresponding location.

Note: For more information on how to use the Live Render Updates column, refer to Using the Scene Graph.

### Revealing Locations with Working Set States

You can expand the Scene Graph, through the right-click context menu, to a working set location with a non-empty state:

| 1. | In the Scene Graph, right-click on the location to expand.

| 2. | Select one of the following working sets to expose:

• Expand To > Viewer Visibility

This expands the scene graph until it reaches a Viewer Visibility working set location with a non-empty state.

• Expand To > Render

This expands the scene graph until it reaches a Render working set location with a non-empty state.

• Expand To > Live Render Updates

This expands the scene graph until it reaches a Live Render Updates working set location with a non-empty state.

### Including Proxy Children in Working Sets

In the Scene Graph, you can include locations with proxies attributes into the respective Working Set. To do so, in the Viewer Visibility, Render, or Live Render Updates column, right-click on one or more selected locations and select Include Proxy Children...

## Saving and Restoring Working Sets States

Bookmarks can be used to save and restore Working Sets, and the currently expanded and -selected parts of the scene graph, within a single session of Katana, and between sessions when Katana is quit and re-started. This allows you to return quickly to a Working Set configuration or scene graph state at any time. For example, if you want Katana to show a particular set of objects in the Viewer, or are interested in inspecting the attributes of a specific deeply-nested location.

Note: To store the state of the Working Sets in your Katana project in a scene graph bookmark, refer to Bookmarking a Scene Graph State and Working Sets.