Structure ========= .. highlight:: xml Args Files are XML document files with a ``.args`` file extension [#f1]_ that contain a top-level ```` element:: Within the top-level ```` element, an Args File may contain ````, ````, and ```` elements. A single ```` or (for shader args) ```` element may also be present. ```` elements are used to expose parameters in the user interface. .. [#f1] Args Files for GenericAssign use a ``.xml`` file extension. Parameters ---------- ```` XML elements describe the presence and order of parameters within the UI. Each ```` element is required to have a ``name`` attribute; all other properties are optional. Args Files can be used to specify the types of widgets to use for parameters in Katana's UI. The type of widget to use for a particular parameter can be specified using a ``widget`` XML attribute on a ```` element:: A number of hints can be specified to affect the appearance and behavior of a widget of the respective type. Some hints are respected by most or all widget types, such as :ref:`args-conditional-vis`; other hints are specific to only particular types of widgets. In their simplest form, hints can be specified using an XML attribute named the same as the hint name:: .. seealso:: :doc:`WidgetsAndHints` for a list of available widgets and hints. Pages and Groups ---------------- Pages can be used to visually group parameters. Pages can be nested with dot-delimited values:: Page grouping may also be specified via enclosing ```` elements. This is often preferable as it provides a place to attach UI hints to pages themselves. Nested ```` elements specify their name properties as a dot-delimited path relative to the enclosing value. The following is equivalent to the previous example:: Pages appear in Katana's UI as groups of their contents under a common header, with a disclosure triangle allowing the user to open or close the respective group. The initial state of whether a page's group appears as open or closed can be specified with the ``open`` property, which accepts a boolean value. Pages default to appearing as closed unless otherwise specified. For example:: A group is visually identical to a page, but differs in that it creates a group parameter to contain its children, whereas pages have no impact on the underlying parameter structure. This is most useful when writing :doc:`ForGenericAssign`, where parameter groups correspond with attribute groups. .. _args-help: Help Text --------- Help text may be defined for any ````, ````, or ```` element by adding a ``help`` attribute or element to it, for example:: The color of the light ```` elements may contain arbitrary HTML. Additional emphasis may be placed on given help text via the ``helpAlert`` attribute, which can be set to one of three values: ``normal`` The help button's icon is shown in its default appearance. ``warning`` The help button's icon appears with a yellow border. ``error`` The help button's icon appears with a red border. For example:: This parameter is very important. Be careful! Help may also be added at the top level with a ```` element, for example:: This is a lovely shader. Comments -------- Comments use standard XML markup::