View Manager Attributes

View attributes for 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.

 

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.

 

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.

Attribute Name

Description

Supports

activecamera:a

Changes the camera for the 'A' view to a specific scene camera. Also returns the name of the current scene camera. This syntax can also be applied to views: 'B', 'C' and 'D'.

Possible Values:

<any scene camera> The 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'.

• Get (cameras only)

• Set (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:

<any view> The Type of any View. See the Type argument for the OpenView command to see a list of available views.

• Get

• Set

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:

<viewport> The viewport to set ("A", "B", "C" or "D").

• Get

• Set

viewportundermouse

The viewport ("A", "B", "C" or "D"). Possible layouts are under the mouse (or last viewport if mouse is not currently over the view manager).

• Get

layout

Changes or returns the layout of the specified viewport(s) ("A", "B", "C" or "D") to 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 method for an example using this attribute.

Possible Values:

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'.

• Get

• Set

 

See View Attributes for a complete list of types of attributes that you can use when customizing your Relational Views.

 



Autodesk Softimage 2011