Page Class

From Derivative
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The Page Class describes the list of custom parameters contained on a page. Pages are created on components via the COMP Class. See also the guide Custom Parameters.

Methods that create parameters return a list of parameters that were created.

To view individual attributes of each parameter such as default, min, max, etc, see the Par Class documentation.


Members[edit]

namebool :

Get or set the name of the page.

ownerOP (Read Only):

The OP to which this object belongs.

parslist (Read Only):

The list of parameters on this page.

indexint (Read Only):

The numeric index of this page.

isCustombool (Read Only):

Boolean for whether this page is custom or not.

Methods[edit]

appendOP(name, label=None, order=None, replace=True)[list of Pars]:

Create a node reference type parameter. This parameter will accept references to any operator.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendCOMP(name, label=None, order=None, replace=True)[list of Pars]:

Create a COMP node reference type parameter. This parameter will only accept references to COMPs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendObject(name, label=None, order=None, replace=True)[list of Pars]:

Create a 3D Object COMP node reference type parameter. This parameter will only accept references to 3D Object COMPs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendPanelCOMP(name, label=None, order=None, replace=True)[list of Pars]:

Create a Panel COMP node reference type parameter. This parameter will only accept references to Panel COMPs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendTOP(name, label=None, order=None, replace=True)[list of Pars]:

Create a TOP node reference type parameter. This parameter will only accept references to TOPs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendCHOP(name, label=None, order=None, replace=True)[list of Pars]:

Create a CHOP node reference type parameter. This parameter will only accept references to CHOPs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendSOP(name, label=None, order=None, replace=True)[list of Pars]:

Create a SOP node reference type parameter. This parameter will only accept references to SOPs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendMAT(name, label=None, order=None, replace=True)[list of Pars]:

Create a MAT node reference type parameter. This parameter will only accept references to MATs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendDAT(name, label=None, order=None, replace=True)[list of Pars]:

Create a DAT node reference type parameter. This parameter will only accept references to DATs, and will refuse operators of other families.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendInt(name, label=None, size=1, order=None, replace=True)[list of Pars]:

Create a integer type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • size - (Keyword, Optional) Set the number of values associated with the parameter. When greater than 1, the parameter will be shown as multiple float fields without a slider and multiple parameters will be created with the index of the parameter appended to the parameter name, starting at 1.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendFloat(name, label=None, size=1, order=None, replace=True)[list of Pars]:

Create a float type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • size - (Keyword, Optional) Set the number of values associated with the parameter. When greater than 1, the parameter will be shown as multiple float fields without a slider and multiple parameters will be created with the index of the parameter appended to the parameter name, starting at 1.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendXY(name, label=None, order=None, replace=True)[list of Pars]:

Create a XY position type parameter. Similar to creating a float parameter with size=2, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendXYZ(name, label=None, order=None, replace=True)[list of Pars]:

Create a XYZ position type parameter. Similar to creating a float parameter with size=3, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendWH(name, label=None, order=None, replace=True)[list of Pars]:

Create a WH size type parameter. Similar to creating a float parameter with size=2, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendUV(name, label=None, order=None, replace=True)[list of Pars]:

Create a UV 2D texture type parameter. Similar to creating a float parameter with size=2, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendUVW(name, label=None, order=None, replace=True)[list of Pars]:

Create a UVW 3D texture type parameter. Similar to creating a float parameter with size=3, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendRGB(name, label=None, order=None, replace=True)[list of Pars]:

Create a RGB color type parameter. Similar to creating a float parameter with size=3, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendRGBA(name, label=None, order=None, replace=True)[list of Pars]:

Create a RGBA color type parameter. Similar to creating a float parameter with size=4, but with more appropriate default naming.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendStr(name, label=None, order=None, replace=True)[list of Pars]:

Create a string type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendStrMenu(name, label=None, order=None, replace=True)[list of Pars]:

Create a menu type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendMenu(name, label=None, order=None, replace=True)[list of Pars]:

Create a menu type parameter. Returns the created parameter objects.

To set the actual menu entries, use the Par members: .menuNames and .menuLabels.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendFile(name, label=None, order=None, replace=True)[list of Pars]:

Create a file reference type parameter. Has built-in functionality to open a new file picker window.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendFolder(name, label=None, order=None, replace=True)[list of Pars]:

Create a folder reference type parameter. Has built-in functionality to open a new folder picker window.

Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendPulse(name, label=None, order=None, replace=True)[list of Pars]:

Create a pulse button type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendMomentary(name, label=None, order=None, replace=True)[list of Pars]:

Create a momentary button type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendToggle(name, label=None, order=None, replace=True)[list of Pars]:

Create a toggle button type parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendPython(name, label=None, order=None, replace=True)[list of Pars]:

Create a python expression parameter. Returns the created parameter objects.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendPar(name, par=None, label=None, order=None, replace=True)[list of Pars]:

Create a parameter with attributes copied from an existing parameter. Returns the created parameter objects.

  • name - The name of the parameter. Built-in names can be used as they will be automatically adjusted to match proper custom name casing (begin with uppercase letter followed by lowercase letters and numbers only).
  • par - (Keyword, Optional) The parameter to copy attributes from. If none specified, a default parameter created.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

appendHeader(name, label=None, order=None, replace=True)[list of Pars]:

Returns the created parameter objects. Only the value will be shown, not its label.

  • name - The name of the parameter.
  • label - (Keyword, Optional) The displayed label of the parameter, default will use the name argument.
  • order - (Keyword, Optional) Specify the display order of the parameter, default is highest.
  • replace - (Keyword, Optional) By default, replaces parameter with fresh attributes. If False, it errors if the parameter already exists.

destroy()None:

Destroy the page this object refers to, and all its parameters.

sort(parameter1, parameter2, parameter3..)None:

Reorder custom parameters in specified order.

n = op('base1')
page = n.appendCustomPage('Custom1')
page.sort('Speed','Color','Value')

TouchDesigner Build: