Layouts and views are defined by an XML-based format:
.xsivw is used for views, including relational views, which can be floating or embedded in a layout or another view. It is also used to define the properties factory views, but that version of the syntax is not covered here.
You can edit the layout and view files in a text editor or XML editor to set options that you cannot control through the layout or view editor in the Softimage interface. Some features you can set in this way are:
Synchronizing and aligning the current frame among timeline, fcurve editor, dopesheet, and animation mixer panes.
For additional examples, take a look at the .xsily files installed in the factory location to see how they were put together. There are also some sample .xsivw files in the SDK Examples workgroup (see SDK Example Workgroup).
Here is an overview of the .xsily/.xsivw format. Note that this is not an actual example — some elements and attributes are valid only for layouts and others are valid only for views. Each element (tag) and its attributes are described in more detail later. Note that all attribute values are strings and are enclosed in double quotes.
<?xml version="1.0" encoding="iso-8859-1"?> <xsi_file type="Layout" xsi_version="7.0" syntax_version="1.1"> <relationalview clsid="{1ECE3500-ED3A-4A74-8999-0D301347AB5E}" name="Fluffy's Workspace" height="1141" width="3198" nbscreen="2"> <definition maxinstances="10000" acceptfocus="true" private="false" defaultsize="100,100,500,500" cmdmap="{00000000-0000-0000-0000-000000000000}" supportedtypes="6" category="Fluffy"> </definition> <bitmaps> <bitmap name="fluffy" path="fluffy.bmp" highlightpath="fluffy_highlight.bmp"> </bitmap> <!-- Etc., etc., etc. --> </bitmaps> <relations> <relation driver="explorer1" driven="objview1" event="selectionproc" cmd="my_selproc"> </relation> <!-- Etc., etc., etc. --> </relations> <viewdefaultpos> <view type="Animation Editor" position="113,532,1137,859"> </view> <!-- Etc., etc., etc. --> </viewdefaultpos> <frameset orientation="horizontal" name="Frameset1" splitter="movable" sizechild="160,*"> <frame name="explorer1" type="Explorer" primary="true" toolbar="own"> </frame> <frameset orientation="vertical" name="Frameset2" splitter="movable" sizechild="*,100"> <switcher type="tray" buttonside="bottom" active="0" orientation="horizontal" name="Tray4" buttonsize="80,30" splitter="none" sizechild="*,*,*"> <frameset orientation="vertical" name="Frameset3" bitmap="fluffy" splitter="movable" sizechild="*,50"> <frame name="objview1" type="Object View" primary="false" toolbar="own"> <properties> <displaymode>shaded</displaymode> <!-- Etc., etc., etc. --> </properties> </frame> <!-- Etc., etc., etc. --> </frameset> <frame name="rtree1" bitmap="rtree" type="Render Tree" primary="false" toolbar="own"> </frame> <!-- Etc., etc., etc. --> </switcher> <!-- Etc., etc., etc. --> </frameset> </frameset> <autohide> <section side="left" activation="10,0,50%;10,50%,100%"> <view viewsize="105,0,100%"> <frameset orientation="vertical" name="ah_frameset1" splitter="none" sizechild="30,*"> <!-- Etc., etc., etc. --> </frameset> </view> <!-- Etc., etc., etc. --> </section> <!-- Etc., etc., etc. --> </autohide> <script language="JScript"> <![CDATA[ function RV_Init( in_rv) { AddProp("My_Custom_Property", "Scene_Root", "", "", null); } function RV_Term( in_rv) { DeleteObj("Scene_Root.My_Custom_Property"); } function my_selproc( in_list, in_driverName, in_drivenName, in_rv ) { // This example simply shows how to populate the driven pane. // It is equivalent to event="selection". in_rv.Views(in_drivenName).SetAttributeValue("targetcontent", in_list.GetAsText()); } ]]> </script> <floatingwindows> <view name="Explorer1" type="Explorer" position="128,81,500,563"> <properties> <scope>Passes</scope> <!-- Etc., etc., etc. --> </properties> </view> <!-- Etc., etc., etc. --> </floatingwindows> </relationalview> </xsi_file>
The XML declaration is required by the XML parser. It must always be the first line and should never be modified.
<?xml version="1.0" encoding="iso-8859-1"?>
The <xsi_file> element is the root element for layouts and views. There can be only one per file.
<xsi_file type="Layout" xsi_version="5.0" syntax_version="1.1">
Applies to: layouts and views (required)
Children: <relationalview> (required, one only)
Defines the basic characteristics of a layout or view, and contains all its components. There should be exactly one.
<relationalview clsid="{1ECE3500-ED3A-4A74-8999-0D301347AB5E}" name="Fluffy's Workspace" height="1141" width="3198" nbscreen="2">
Applies to: layouts and views (required, one only)
Parent: <xsi_file>
Children: <definition> (required, views only, one only), <bitmaps> (optional, one only), <relations> (optional, views only, one only), <viewdefaultpos> (optional, layouts only, one only), <frameset> (required, one only as a direct child of <relationalview>), <autohide> (optional, layouts only, one only), <script> (optional, views only, one only), <floatingwindows> (optional, layouts only, one only)
An identifier for the view or layout. The value must be unique across all existing layouts and views. If necessary, use a GUID generator.
The name of the view or layout as it appears in menus and other parts of the Softimage interface. The name can also be used in scripts and plug-ins, for example, with the OpenView command. The name must be unique across all existing layouts and views.
The default height for views in pixels. A layout can also store default size and position values for views (see <viewdefaultpos> below), which overrides the value set here for that layout.
This attribute is ignored in layout definitions. Layouts use the entire screen space when maximized.
The default width for views in pixels. A layout can store default size and position values for views (see <viewdefaultpos> below), which overrides the value set here for that layout.
This attribute is ignored in layout definitions. Layouts use the entire screen space when maximized.
Defines some basic properties of views.
<definition maxinstances="10000" acceptfocus="true" private="false" defaultsize="100,100,500,500" cmdmap="{00000000-0000-0000-0000-000000000000}" supportedtypes="6" category="Fluffy"> </definition>
Applies to: views only (required)
Parent: <relationalview>
The maximum number of views of that type that can be opened at once.
If this attribute is set to 1, the view is considered to be a single-instance view. If such a view is contained in a layout but hidden by a switcher displaying a different pane, then displaying the view by a key press or other mechanism will activate the corresponding pane in the switcher.
Controls whether the view appears in menus. This allows you to define views that can be opened programmatically or instanced inside other view and layout definitions but that don't clutter the menus.
Defines the default position of the view window. This attribute should be set to a string of four integers separated by commas (no spaces). The first two integers are the offsets in pixels of the view window from the left and top of the main Softimage window. The other two values are unused — the height and width defined in <relationalview> are used instead.
Layouts can store default size and position values for views (see <viewdefaultpos> below), which overrides the value set here for that layout.
Contains a list of bitmaps that can be used as buttons in switchers.
<bitmaps> <bitmap name="fluffy" path="fluffy.bmp" highlightpath="fluffy_highlight.bmp"> </bitmap> <!-- Etc., etc., etc. --> </bitmaps>
Applies to: layouts and views (optional)
Parent: <relationalview>
Children: <bitmap> (optional, one or more)
Defines a bitmap that can be used as a button in a switcher. Button images can be in any supported image format.
<bitmap name="fluffy" path="fluffy.bmp" highlightpath="fluffy_highlight.bmp"> </bitmap>
Applies to: layouts and views (optional)
Parent: <bitmaps>
Contains a list of driver/driven relations between panes in a view.
<relations> <relation driver="explorer1" driven="objview1" event="selectionproc" cmd="my_selproc"> </relation> <!-- Etc., etc., etc. --> </relations>
Applies to: views only (optional)
Parent: <relationalview>
Children: <relation> (optional, one or more)
Defines a driver/driven relation between panes in a view. Selecting elements in the driving pane causes the driven pane to update.
<relation driver="explorer1" driven="objview1" event="selectionproc" cmd="my_selproc"> </relation>
Applies to: views only (optional)
Parent: <relations>
The name of the pane that is driving the relation. This is the name that is defined in the corresponding <frame> element. Selections made in this pane affect the driven pane.
The name of the pane that is driven by the relation. Again, this is the name that is defined in the corresponding <frame> element. The contents of this pane are affected by selections made in the driving pane, but not by selections made elsewhere.
The filter or subroutine that implements the relation:
If event is "selection", this attribute is ignored.
If event is "selectionfilter", this value should be the name of the filter to use. 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.).
If event is "selectionfunc" or "selectionproc", this value should be the name of the subroutine to run. The subroutine should be defined in the <script> block.
Contains a list of the default sizes and positions for floating windows in a layout. If a view appears in this list, the values set here override the defaults set in the view's own .xsivw file.
This section is saved when you move a floating window, close it, and then save the layout (View Layouts Save Layouts).
<viewdefaultpos> <view type="Animation Editor" position="113,532,1137,859"> </view> <!-- Etc., etc., etc. --> </viewdefaultpos>
Applies to: layouts only (optional)
Parent: <relationalview>
Children: <view> (child of <viewdefaultpos>) (optional, one or more)
Defines the size and position of a floating view in a layout.
<view type="Animation Editor" position="113,532,1137,859"> </view>
Applies to: layouts only (optional)
Parent: <viewdefaultpos>
Defines how a pane is divided into subpanes that can contain different views. Framesets can be nested arbitrarily deep to divide a window in complex ways. A frameset can have one or more children, each one being a frame, a switcher, or another frameset.
<frameset orientation="horizontal" name="Frameset1" splitter="movable" sizechild="160,*"> <frame name="explorer1" type="Explorer" primary="true" toolbar="own"> </frame> <frameset orientation="vertical" name="Frameset2" splitter="movable" sizechild="*,100"> <switcher type="tray" buttonside="bottom" active="0" orientation="horizontal" name="Tray4"buttonsize="80,30" splitter="none" sizechild="*,*,*"> <frameset orientation="vertical" name="Frameset3" bitmap="fluffy" splitter="movable" sizechild="*,50"> <frame name="objview1" type="Object View" primary="false" toolbar="own"> <properties> <displaymode>shaded</displaymode> <!-- Etc., etc., etc. --> </properties> </frame> <!-- Etc., etc., etc. --> </frameset> <frame name="rtree1" bitmap="rtree" type="Render Tree" primary="false" toolbar="own"> </frame> <!-- Etc., etc., etc. --> </switcher> <!-- Etc., etc., etc. --> </frameset> </frameset>
Applies to: layouts and views (at least one required)
Parent: <relationalview>, <frameset>, <switcher>, <view> (child of <section>)
Children: <frameset>, <switcher>, <frame> (at least one or more in any combination)
Note that <frameset> shares the same attributes as <switcher>, although those attributes that are specific to switcher functionality are ignored in framesets. Occasionally, switcher-only attributes appear in a <frameset> tag when editing views and layouts in the Softimage interface; these attributes can be safely ignored or removed. Only the attributes described in this section apply to <frameset>.
Controls how subpanes are arranged. To have both horizontal and vertical splits in a window, nest one frameset inside another.
A string to identify the frameset. This attribute is optional. If it exists, it must be unique within the view or layout. It is not case-sensitive. When the frameset is the child of a switcher, this string is displayed on the button if a displayname or bitmap is not specified. This string is also used on the View Optional Panels menu if the optional attribute exists and displayname does not exist.
This attribute applies only to panes in a layout. If it appears in the tag, the pane is added to the View Optional Panels menu. When an optional pane is hidden, its size is considered to be 0 for the purpose of calculating the sizes of the other children in the parent pane. The menu uses the displayname if it exists, otherwise it falls back on the name.
A string that appears on switcher buttons if there is no bitmap attribute. It allows you to display mixed-case characters on buttons. If this attribute is omitted and there is no bitmap attribute, the name attribute is displayed on buttons. This value also appears on the View Optional Panels menu if the optional attribute exists.
A string that appears on the tooltip when users hover the mouse over a button in a switcher. If this attribute is not defined, the tooltip falls back on displayname and then on name. This attribute has an effect only when the pane is the child of a switcher.
The name of a bitmap as defined in the <bitmaps> section. This is used on switcher buttons. This attribute has no effect if the pane is not the child of a switcher. If this attribute is omitted, then the displayname or name attribute is used on switcher buttons instead.
Controls the display and behavior of the splitter bar that divides panes.
The sizes of the subpanes in order. This is a comma-separated string (no spaces). The sizes are interpreted horizontally or vertically, depending on the orientation. The number of items in the string is the number of subpanes and should be the same as the number of child elements. Each item in the string can be:
An integer. This represents an absolute size in pixels. This is useful for portions of the window that you don't want to be resized, like toolbars.
A percentage. The pane retains its relative proportion when users change the window size.
An asterisk "*". The pane uses all free space remaining. This is useful to ensure that the sizes of all panes in a frameset add up correctly no matter how the window is resized. Typically, there should always be one subpane with a size of "*".
Remember that users may change the sizes once a view is displayed, depending on whether the splitter bars are movable.
Some additional notes about setting sizes:
If you use all absolute sizes, there may be unused space or hidden areas if the sizes do not add up to the size of the parent frameset.
If you have two or more panes set to free (*) in the same frameset, the leftmost or topmost one takes all the available space.
If you mix absolute with relative and/or free size, the relative values are based on what's left of the parent frameset's size after the absolute sizes are considered.
If relative sizes do not add up to 100% and there is no pane with a free size, then the relative values are normalized.
Specifies the view to be displayed in a pane, for example, an explorer, animation editor, or custom view.
<frame name="objview1" type="Object View" primary="false" toolbar="own"> <properties> <displaymode>shaded</displaymode> <!-- Etc., etc., etc. --> </properties> </frame>
Parent: <frameset>, <switcher>, <view> (child of <section>)
Children: <properties> (optional)
An identifier that represents the instance of the view contained in the frame. It must be unique within a layout or view. It is not case-sensitive. This is the name that is used in relations, and also the name that is used in the SDK to get a pointer to that view in order to get or set view attributes. The name is also used on switcher buttons if there is no displayname or bitmap attribute. This string is also used on the View Optional Panels menu if the optional attribute exists and displayname does not exist.
This attribute applies only to panes in a layout. If it appears in the tag, the pane is added to the View Optional Panels menu. When an optional pane is hidden, its size is considered to be 0 for the purpose of calculating the sizes of the other children in the parent pane. The menu uses the displayname if it exists, otherwise it falls back on the name.
A string that appears on switcher buttons if there is no bitmap attribute. It allows you to display mixed-case characters on buttons. If this attribute is omitted and there is no bitmap attribute, the name attribute is displayed on buttons. This value also appears on the View Optional Panels menu if the optional attribute exists.
A string that appears on the tooltip when users hover the mouse over a button in a switcher. If this attribute is not defined, the tooltip falls back on displayname and then on name. This attribute has an effect only when the pane is the child of a switcher.
The name of a bitmap as defined in the <bitmaps> section. This is used on switcher buttons. This attribute has no effect if the pane is not the child of a switcher. If this attribute is omitted, then the displayname or name attribute is used on switcher buttons instead.
The pane contents. This must be the name of a factory or custom view as defined in its own .xsivw file.
Controls how the the toolbar appears.
The name of a <frame> that exists in the same file and has type="Timeline". This synchronizes and aligns the view in this pane with that timeline. This works with the Animation Mixer, Dopesheet and Fcurve editor.
Contains a list of view attributes and their values. Each view attribute that you want to set should be a child tag of this element, and its value should be that tag's content as in the following:
<properties> <attributename>value</attributename> <!-- Etc., etc., etc. --> </properties>
The specific view attributes that are available depend on the view's type. The contents of each element should be a valid value for the corresponding view attribute. For a list of attributes and values for the various views, see View Attributes [SDK Guide].
<frame name="pane5" type="Object View" primary="false" toolbar="own"> <properties> <displaymode>shaded</displaymode> <localview>true</localview> </properties> </frame>
Applies to: layouts and views (optional)
Creates a pane that can switch between different child panes using buttons. Each child can be a frame, a frameset, or another switcher. Switchers can be nested arbitrarily deep.
The buttons in a switcher display bitmap if it exists, and fall back on displayname and then name otherwise. If users hover the mouse pointer over a button, the tooltip uses description if it exists, and falls back on displayname and then name otherwise.
<switcher type="tray" buttonside="bottom" active="0" orientation="horizontal" name="Tray4" buttonsize="80,30" splitter="none" sizechild="*,*,*"> <frameset orientation="vertical" name="Frameset3" bitmap="fluffy" splitter="movable" sizechild="*,50"> <!-- Etc., etc., etc. --> </frameset> <frame name="rtree1" bitmap="rtree" type="Render Tree" primary="false" toolbar="own"> </frame> <!-- Etc., etc., etc. --> </switcher>
Parent: <frameset>, <switcher>, <view> (child of <section>)
Children: <frameset>, <switcher>, <frame>
The only value supported by custom views and layouts is "tray". Tray switchers display only one child pane at a time.
Controls where the switcher buttons appear. Possible values are "top", "left", "bottom", or "right".
A string specifying the number (zero-based index) of the child that is active when the view or layout is first opened.
A string to identify the switcher. This attribute is optional. If it exists, it must be unique within the view or layout. It is not case-sensitive. When the frameset is the child of a switcher, this string is displayed on the button if a displayname or bitmap is not specified. This string is also used on the View Optional Panels menu if the optional attribute exists and displayname does not exist.
This attribute applies only to panes in a layout. If it appears in the tag, the pane is added to the View Optional Panels menu. When an optional pane is hidden, its size is considered to be 0 for the purpose of calculating the sizes of the other children in the parent pane. The menu uses the displayname if it exists, otherwise it falls back on the name.
A string that appears on switcher buttons if there is no bitmap attribute. It allows you to display mixed-case characters on buttons. If this attribute is omitted and there is no bitmap attribute, the name attribute is displayed on buttons. This value also appears on the View Optional Panels menu if the optional attribute exists.
A string that appears on the tooltip when users hover the mouse over a button in a switcher. If this attribute is not defined, the tooltip falls back on displayname and then on name. This attribute has an effect only when the pane is the child of a switcher.
The name of a bitmap as defined in the <bitmaps> section. This is used on switcher buttons. This attribute has no effect if the pane is not the child of a switcher. If this attribute is omitted, then the displayname or name attribute is used on switcher buttons instead.
Contains a list of autohiding panes in a layout.
<autohide> <section side="left" activation="10,0,50%;10,50%,100%"> <view viewsize="105,0,100%"> <frameset orientation="vertical" name="ah_frameset1" splitter="none" sizechild="30,*"> <!-- Etc., etc., etc. --> </frameset> </view> <!-- Etc., etc., etc. --> </section> <!-- Etc., etc., etc. --> </autohide>
Applies to: layouts only (optional)
Parent: <relationalview>
Children: <section> (maximum 4)
Defines the activation zones on one of four sides in a layout.
<section side="left" activation="10,0,50%;10,50%,100%"> <view viewsize="105,0,100%"> <frameset orientation="vertical" name="ah_frameset1" splitter="none" sizechild="30,*"> <!-- Etc., etc., etc. --> </frameset> </view> <!-- Etc., etc., etc. --> </section>
Applies to: layouts only (optional)
Parent: <autohide>
Children: <view> (child of <section>)
Specifies one of the four sides of a layout. Possible values are "top", "left", "bottom", or "right".
The activation zones on one side of a layout. An autohide pane is displayed when the mouse pointer enters an activation zone. There can be multiple activation zones, each one corresponding to a separate autohide pane defined in its own <view> tag.
This value is a list of triplets of numbers. Triplets are separated by semicolons (;), and numbers within a triplet are separated by commas (no spaces). There is one triplet for each <view> child of the <section>. In order, the numbers in a triplet represent:
The width (if the side is left or right) or the height (if the side is top or bottom) of the activation zone.
The top (if the side is left or right) or the left (if the side is top or bottom) of the activation zone.
The bottom (if the side is left or right) or the right (if the side is top or bottom) of the activation zone.
All numbers can be integers (pixels) or percentages, where (0, 0) is the top left corner of the layout.
If two or more activation zones overlap, the first one defined takes precedence. This is also true if the overlapping activation zones are defined in separate <section> elements.
Defines the size and position of an autohide pane when it is displayed. There should be one view for every triplet in the activation attribute of the parent <section> element.
<view viewsize="105,0,100%"> <frameset orientation="vertical" name="ah_frameset1" splitter="none" sizechild="30,*"> <!-- Etc., etc., etc. --> </frameset> </view>
Applies to: layouts only (optional)
Parent: <section>
Children: <frameset>, <frame>, <switcher> (maximum 1 direct child)
A comma-separated list (no spaces) of three numbers that defines the size and position of the autohide pane. The pane disappears as soon as the mouse pointer leaves this area. Therefore it is important that the viewsize completely covers the corresponding activation size, otherwise the panel may disappear as soon as it is displayed.
As with the activation size, the numbers represent:
The width (if the side is left or right) or the height (if the side is top or bottom) of the autohide pane.
The top (if the side is left or right) or the left (if the side is top or bottom) of the autohide pane.
The bottom (if the side is left or right) or the right (if the side is top or bottom) of the autohide pane.
Contains scripts that can be used in the view.
The contents of this element should be enclosed in a <![CDATA[…]]> section, otherwise any XML markup characters like < and > in your script will prevent the file from parsing correctly.
There are two basic types of script that you can include here:
Init and term callbacks that are executed when the view is initialized and terminated. See RV_Init and RV_Term.
Routines that can be used as the cmd attribute of <relation> when event is "selectionfunc" or "selectionproc". See selectionfunc and selectionproc.
Remember that global code (i.e., code that is not within a function or procedure) runs automatically when the view is opened. This is a side-effect of parsing the script.
<script language="JScript"> <![CDATA[ function RV_Init( in_rv) { AddProp("My_Custom_Property", "Scene_Root", "", "", null); } function RV_Term( in_rv) { DeleteObj("Scene_Root.My_Custom_Property"); } function my_selproc( in_list, in_driverName, in_drivenName, in_rv ) { // This example simply shows how to populate the driven pane. // It is equivalent to event="selection". in_rv.Views(in_drivenName).SetAttributeValue("targetcontent", in_list.GetAsText()); } ]]> </script>
Applies to: views only (optional)
Parent: <relationalview>
Specifies the scripting language used in the <script> block. "VBScript", "JScript", and "Python" are supported by all installations of Softimage.
RV_Init and RV_Term are callbacks that are executed when a custom view is created and closed, respectively. They allow you to perform some set-up at the start and some clean-up at the end.
You must use the exact names RV_Init and RV_Term. Each function is passed a pointer to the view object.
If you set the event parameter of a <relation> to "selectionfunc" or "selectionproc", you must use the cmd parameter to specify the name of a routine, and then create the named routine in the <script> block.
If you are using selectionfunc, your routine 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 in other ways, such as to set the active tab in a shelf.
If you are using selectionproc, your routine does not return a collection. Instead, it uses the object model to control the target content of the driven pane.
In both cases, the routine receives: a collection of objects selected in the driving pane, the name of the driving pane, the name of the driven pane, and a pointer to the relational view.
Contains a list of floating windows that open automatically when a layout is first opened in a Softimage session. Note that during a Softimage session, the states of floating windows are persisted if you switch between layouts.
This section is saved if you have open floating windows when you save a layout (View Layouts Save Layouts).
<floatingwindows> <view name="Explorer1" type="Explorer" position="128,81,500,563"> <!-- Etc., etc., etc. --> </view> <!-- Etc., etc., etc. --> </floatingwindows>
Applies to: layouts only (optional)
Parent: <relationalview>
Children: <view> (child of <floatingwindows>) (optional, one or more)
Defines a floating window that opens automatically when you first open a layout.
<view name="Explorer1" type="Explorer" position="128,81,500,563"> <properties> <scope>Passes</scope> <!-- Etc., etc., etc. --> </properties> </view>
Applies to: layouts only (optional)
Parent: <floatingwindows>
Children: <properties>
A string that identifies the auto-created instance of the floating window. This name must be unique in a layout. It can be used to manipulate the view using the SDK.
You can include standard XML comments in .xsily and .xsivw files. For example, you can include a general description or describe specific sections. Comments begin with:
<!--
-->
Comments cannot appear inside tags (between < and >). In addition, comments cannot be nested.
To include comments in a script inside a <![CDATA[…]]> section, use the comment syntax of the scripting language rather than the XML comment syntax.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License