기술 자료

Asset Transformer Studio


User Manual

Python API

Changelog

Asset Transformer Studio


XML File

How to define a plugin user interface using an XML file in Asset Transformer Studio
읽는 시간 2분최근 업데이트: 25일 전

User Interface creation

A plugin user interface is defined in an XML file. Here is a basic example:
XML file example
Resulting interface

More about Types

Parameter types

Please refer to the API Reference or the Function List to find all the parameter types available in the Python API, and to see a preview of the associated GUI widget.

Structures

Declare your own structured types using the
decltype
and
struct
keywords:
<decltype name="Structure"> <struct> <field name="BoolParameter" type="Bool" default="True"/> <field name="AngleParameter" type="Angle" default="0.1"/> </struct> </decltype> … <parameter name="Structure" type="Structure" description=""/>
Structure widget

Lists

Some types also exist as lists (e.g.
String
and
StringList
). Declare your own lists of structured types using the
decltype
and
list
keywords:
<decltype name="Structure"> <struct> <field name="BoolParameter" type="Bool" default="True"/> <field name="AngleParameter" type="Angle" default="0.1"/> </struct> </decltype> … <decltype name="StructureList"> <list type ="Structure"/> </decltype> … <parameter name="structureList" type="StructureList" description=""/>
List widget

Enumerators

Declare Enumerator types using the
enum
keyword. Enumerators take the form of dropdown menus:
<decltype name="Enumerator"> <enum type="Int"> <value name="Enum_1" value="1"/> <value name="Enum_2" value="2"/> </enum> </decltype> … <parameter name="Enumerator" type="Enumerator" description=""/>
Enumerator widget

Selectors

Use the select keyword to create dropdown selection menus giving inputs choice:
<decltype name="DropDownMenu"> <select> <type name="FirstChoice" type="Structure"/> <type name="SecondChoice" type="ComponentType"/> </select> </decltype> … <parameter name="dropDownMenu" type="DropDown" description=""/>
Selector widget 1
Selector widget 2

Advanced use cases

  • Optional parameters:
    optional="True"
    <parameter name="OptionalParameter" type="OutputDirectoryPath" optional="True" description=""/>
  • Disabled parameters:
    disableValue="-1"
    <parameter name="DisabledValue" type="Int" disableValue="-1" description=""/>
    Disabled parameter enabled
    Disabled parameter disabled
  • Customize
    FilePath
    type so it browses only specified formats:
    <decltype name="InputFilePath" type="FilePath" attributes="extensions:*.pxz"/> … <parameter name="input" type="InputFilePath" description=""/>
    FilePath widget
  • Selectable
    OccurrenceList
    parameters (input filled with current scene selection):
    selection="true"
    <parameter name="occurrences" type="OccurrenceList" selection="true"/>
    OccurrenceList widget