Defining Relationships

 
 
 

Relationships allow one pane to "drive" another pane in a relational view; for example, the selection in an explorer pane can control the object displayed in a schematic pane, but the schematic pane ignores selections made in other views.

Relationships are defined using the Set Pane Relationships dialog box.

To display the Set Pane Relationships dialog box

  • Right-click in any pane and choose Set Relationships.

To add a relationship

  1. In the Set Pane Relationships dialog box, click Add Relationship. A new row appears in the table at the top of the dialog box.

    You do not need to perform this step for the first relationship because there is already a blank row.

  2. Click in the Driver column of the appropriate row to select the cell, and then click a second time to display a pop-up showing the available panes. Pick the pane that you want to use to control another pane.

    These views are supported as drivers: explorer; render tree; shelf (only driven tabs).

  3. Click twice in the Driven column and pick the pane that you want to be controlled by the driver.

    These views support being driven: animation editor, animation mixer; explorer; object view; property editor; property panel; render tree; schematic; shelf; text/script editor; texture editor.

    The same view can be driven by more than one driver. It reacts to the most recent selection made in any view that drives it.

  4. Click twice in the Rel Type column and pick the type of relationship:

    • selection: If one or more elements are selected in the driver pane, they are sent directly to the driven pane as target. The driven pane displays the selected elements only.

    • selectionfilter: This is similar to selection, but the collection of selected elements are filtered before being sent to the driven pane. For example, if you use PolygonMesh as the filter, the driven pane receives only polygon meshes no matter what mixture of object types are selected in the driver pane.

    • selectionfunc: This allows you to write your own function to control the elements received by the driven pane. Your function receives the collection of elements selected in the driver pane, and is responsible for returning a collection of elements to send to the driven pane. The function can also use the object model to modify the view, such as to set the active tab in a shelf.

    • selectionproc: This is similar to selectionfunc except that you do not return a collection. Instead, you use the object model to control the target content of the driven pane.

  5. If Rel Type is not selection, you must specify the filter, function, or procedure. To do this, click twice in the Filter/Cmd column and type the appropriate name.

    • For selectionfilter, enter the name of the filter. You can use any filter that appears on the Filters menu of the Select panel or explorer. Make sure you specify the scripting name of the filter, rather than the display name (which may contain spaces, etc.).

    • For selectionfunc and selectionproc, enter the name of the function or procedure you have written (or will write) in the scripting block of the XML file (*.xsivw) to handle the relationship. See <script>.

To validate relationships

  • In the Set Pane Relationships dialog box, click Validate Relationships.

    Messages about the validity of the relationships in your view appear in the adjoining text box.

To remove a relationship

  • In the Set Pane Relationships dialog box, right-click on the name of the relationship in the leftmost column and choose Remove Relationship.