View Manager Attributes

Introduced

v5.0

View attributes for the View Manager (the View Manager gives you access to the four viewports). Not all attributes support both setting and getting. Check the third column in the table.

Tip Unlike most of the other views you create with the Layout.CreateView method, you are not creating a new view when you instantiate this view; you are creating a pointer to the View Manager (and there is always only one). This means that you always have to access this view using the name "vm", no matter what name you passed with the CreateView method.
Warning Some commands (like GetPrimCamera) return the CameraRig (root). If you try to pass in the return value from that command, the designated viewport will not change cameras.
Note See ViewAttributes for a complete list of types of attributes that you can use when customizing your Relational Views.
Attribute Name Description Supports
activecamera:a Changes the camera for the 'A' view to a specific scene camera or spotlight. Also returns the name of the current scene camera. This syntax can also be applied to views: 'B', 'C' and 'D'.

Possible Values:

Description:

<any scene camera or spotlight> The SIObject.Name of any Camera or SpotLight currently in the scene (not its root). The active camera or spotlight can be set to the Front, Right, Top, or User camera using the values: 'front', 'right', 'top', or 'user' or 'default'. The active camera or spotlight can be set to the render pass camera using the values: 'render' or 'render pass'.
View.GetAttributeValue (cameras only) and View.SetAttributeValue (both cameras and spotlights).
viewport:a Changes the 'A' viewport to a specific view. This syntax can also be applied to viewports: 'B', 'C' and 'D'.

See the View.SetAttributeValue method for an example using this attribute.

Possible Values:

Description:

<any view> The SIObject.Type of any View. A list of views can be found defined in the definition of the Type argument for the OpenView command.
View.GetAttributeValue and View.SetAttributeValue.
focusedviewport The viewport ("A", "B", "C" or "D") in the view manager which has the focus (view clicked in which is indicated by a light gray border).

Possible Values:

Description:

<viewport> The viewport to set ("A", "B", "C" or "D").
View.GetAttributeValue and View.SetAttributeValue.
viewportundermouse The viewport ("A", "B", "C" or "D") under the mouse (or last viewport if mouse is not currently over the view manager). View.GetAttributeValue only.
layout Changes or returns the layout of the specified viewport(s) ("A", "B", "C" or "D"). Possible layouts are fullscreen, vertical, horizontal, or the default (four panes).

When setting the layout, you specify the viewport letter with the value (2nd argument). When getting the layout, you specify the viewport letter with the attribute (1st argument).

See the View.SetAttributeValue and View.GetAttributeValue methods for examples using this attribute.

Possible Values:

Description:

maximize:<any one viewport letter> Makes the specified viewport fullscreen. Possible values are 'a', 'b', 'c' or 'd'. For example, 'oVM.SetAttributeValue("layout","maximize:d")' makes the 'D' viewport the only visible viewport in the layout.
horizontal:<up to two viewport letters> Makes the specified viewport(s) maximized horizontally (halfscreen). Possible values include any combination of 'a', 'b', 'c' or 'd', but only the first two letters are used. For example, 'oVM.SetAttributeValue("layout","horizontal:ad")' makes the 'A' viewport halfscreen on top and the 'D' viewport halfscreen on bottom (ie., 'B' and 'C' disappear). Another example: 'oVM.SetAttributeValue("layout","horizontal:c")' makes the 'C' viewport horizontally maximized at the bottom.
vertical:<up to two viewport letters> Makes the specified viewport(s) maximized vertically (halfscreen). Possible values include any combination of 'a', 'b', 'c' or 'd', but only the first two letters are used. For example, 'oVM.SetAttributeValue("layout","vertical:ad")' makes the 'A' viewport halfscreen at the left and the 'D' viewport halfscreen at the right (ie., 'B' and 'C' disappear). Another example: 'oVM.SetAttributeValue("layout","vertical:abcd")' makes the 'A' and 'B' viewports vertically maximized (ie., 'C' and 'D' disappear).
default (Set only) Displays all four views at once (default layout).
reset (Set only) Resets the display to show all four views at once and make the splitters symmetrical. This ensures that viewports can be constant across different screen resolutions for any scene.
hidden (Get only) The specified viewport is hidden. For example, if you made A and D each horizontally halfscreen with 'oVM.SetAttributeValue("layout","horizontal:ad")' and then called 'oVM.GetAttributeValue("layout:b")', you would get "hidden" as the returned value.
'' (Get only) An empty string is returned if the viewport letter is not 'a', 'b', 'c' or 'd'.
View.GetAttributeValue and View.SetAttributeValue.