Top

Module uiScriptPy.window_class


Index

Classes

class DialogUiScriptWindow

Ancestors (in MRO)

  • DialogUiScriptWindow
  • uiScriptPy.container_class.UiScriptContainer
  • uiScriptPy.base_classes.UiScriptGadget

Methods

def __init__(

self, name, title=None, uiScriptGadgets=(), dialog=True)

def addUiScriptGadget(

self, UiScriptGadget)

Append a UI Script Gadget to the end of the list of gadgets inside this container

def append(

self, UiScriptGadget)

Add a UI Script Gadget after all existing UI Script Gadgets

def appendToContainer(

self, name_or_container_or_indices, gadget_or_container)

Add a UI Script Gadget on the end of Container contents.

def asCode(

self)

Return Python code that will recreate this container.

def asDialogScript(

self)

Return a string containing the dialog script file contents corresponding to this UI Script Gadget Container

def cell(

self)

Returns where in a cell layout this gadget resides.

def cellHeight(

self)

Returns how many cells this gadget spans vertically

1 unless specified

def cellSize(

self)

Returns how many cells this gadget spans

1x1 unless specified

def cellWidth(

self)

Returns how many cells wide this gadget spans

1 unless specified

def clear(

self)

Remove all UI Script Gadgets from this container

def clearScriptCallback(

self)

Clears callback script from uiScriptGadget Template

def containerType(

self)

Return Container Type

def containingContainer(

self, name_or_gadget)

Return UiScriptContainer in this window containing a UI Script Gadget.

def containingContainerIndices(

self, name_or_gadget_or_indices)

Return the indices of the container in this window containing a given UI Script Gadget. Return an empty tuple if no match was found.

def createHouDialog(

self, extend=True)

Create a Houdini Dialog from this DialogUiScriptWindow

extend=True bind instance specific methods for better control. These do not alter other dialog instances or the Class STRONGLY RECOMENDED

def entries(

self)

Return a tuple containing all UiScriptGadgets inside this window.

def entriesWithoutContainers(

self)

Return a tuple containing all the non-container UI Script Gadgets inside this group. The output is the flattened set of UI Script Gadgets in the window, and includes the non-container gadgets inside containers.

def entryAtIndices(

self, indices)

Given a sequence of integer indices return a copy of the UiSctiptGadget object at that location. The indices are of the format returned by findIndices

def exclusive(

self)

def find(

self, name)

Search in this container for a UI Script Gadget whose name matches the specified one. Return a copy of the UI Script gadget or None if no match was found.

def findContainer(

self, name)

Search in this group for a container UI Script gadget with the given name. Return the UiScriptContainer or None if the container wasn't found.

def findIndices(

self, name_or_gadget)

Search in this window for a UI Script gadget and return a tuple of integers corresponding to the indices of the gadget in the window. Return an empty tuple if no match was found.

def findIndicesForContainer(

self, name)

Search in this window for a container UI Script gadget with the given label. Return an empty tuple if no match was found.

def hMargin(

self)

Returns the horizontal margins around the child gadget area in a container, in UI units.

def hStretch(

self)

Returns the gadget stretchiness value horizontally. 0 being none and 1 being normal.

def height(

self)

Returns the fixed height for the gadget, in UI units

Any vertical stretch is ignored, though the gadget can still stretch horizontally.

def hide(

self)

Hide a gadget by making it invisible. The gadget still exists in the window, but will not be display in it.

def hideContainer(

self)

Hide a container and all the gadget in it

def icon(

self)

def indicesOf(

self, name_or_gadget)

earch in this window for a UI Script gadget and return a tuple of integers corresponding to the indices of the gadget in the window. Return an empty tuple if no match was found.

Alias for findIndices

def insertAfter(

self, name_or_gadget_or_indices, gadget_or_container)

Insert a UI Script Gadget inside this window after an existing one. The new gadget will be in the same container as the existing one.

def insertBefore(

self, name_or_gadget_or_indices, gadget_or_container)

Insert a UI Script Gadget inside this window before an existing one. The new gadget will be in the same container as the existing one.

def isContainerHidden(

self)

Return whether a container or one of its containing containers is hidden.

def isDialog(

self)

def isHidden(

self)

Return whether the given gadget is itself hidden or lies inside a hidden container.

def justify(

self)

Returns the position the child box within the container, when the children in a container cannot grow to fill the entire area of the container.

def keyvalue(

self)

Returns keyvalue. value is changed whenever a key is pressed and contains the key value.

def layout(

self)

Returns value from enumeration uiScriptLayout

def look(

self)

Returns the look of the gadget

def margin(

self)

Returns the margins around the child gadget area in a container, in UI units.

def maxHeight(

self)

Returns the maximum height of a gadget, in UI units.

def maxSize(

self)

Returns maximum size of a gadget, in UI units.

def maxWidth(

self)

Returns the maximum width of a gadget, in UI units.

def minHeight(

self)

Returns the minimum height of the gadget, in UI units. The gadget will never shrink to smaller than this size.

def minSize(

self)

Returns the minimum size of the gadget, in UI units. The gadget will never shrink to smaller than this size.

def minWidth(

self)

Returns the minimum width of the gadget, in UI units. The gadget will never shrink to smaller than this size.

def name(

self)

def namingScheme(

self)

Return the naming scheme used

Used only when more than 1 component

def numComponents(

self)

Return the number of values stored

def prefHeight(

self)

Returns the preferred height of the gadget, in UI units. The preferred height is the height the gadget would like to be laid out at, if space is available.

def prefSize(

self)

Returns the preferred size of the gadget, in UI units. The preferred size is the size the gadget would like to be laid out at, if space is available.

def prefWidth(

self)

Returns the preferred width of the gadget, in UI units. The preferred width is the width the gadget would like to be laid out at, if space is available.

def remove(

self, name_or_gadget_or_indices)

Remove a UI Script gadget from the window.

Note that if you remove a container, all of the gadgets in the container are also removed.

def replace(

self, name_or_gadget_or_indices, gadget_or_container)

Replace a UI Script gadget inside this window with another UI Script gadget

def scriptCallback(

self)

Return script as a string that runs on gadget changes.

Note Currently only python callbacks are supported.

def setCell(

self, x, y)

Specify where in a cell layout this gadget resides.

def setCellHeight(

self, h)

Specify how many cells this gadget spans vertically

1 unless specified

def setCellSize(

self, w, h)

Specify how many cells this gadget spans

1x1 unless specified

def setCellWidth(

self, w)

Specify how many cells wide this gadget spans

1 unless specified

def setExclusive(

self, value)

def setHMargin(

self, hm)

Sets the horizontal margins around the child gadget area in a container, in UI units.

def setHStretch(

self, h=1)

Makes the gadget stretchable horizontally. Specify floating point values for the amount of stretchiness: 0 being none and 1 being normal.

Useful for fields and sliders.

def setHeight(

self, h)

Specify a fixed height for the gadget, in UI units.

Any vertical stretch is ignored, though the gadget can still stretch horizontally.

def setIcon(

self, iconname)

def setIsDialog(

self, value)

def setJustify(

self, uiScriptJustifyHoriz, uiScriptJustifyVert)

Specify where to position the child box within the container, when the children in a container cannot grow to fill the entire area of the container.

def setKeyvalue(

self, val)

Normally set on windows, changed whenever a key is pressed and contains the key value.

def setLayout(

self, uiScriptLayout)

Sets a containers layout style. from enumeration uiScriptLayout

def setLook(

self, uiScriptLook)

Specifies the look of the gadget, though this is mostly used for container feels and windows

def setMargin(

self, m)

Sets the margins around the child gadget area in a container, in UI units.

def setMaxHeight(

self, h)

Set the maximum height of a gadget, in UI units.

Generally used in conjunction with STRETCH, to prevent a gadget from getting undesirably large. The max height must be larger than both the minimum and preferred height, if specified.

def setMaxSize(

self, w, h)

Set the maximum size of a gadget, in UI units.

Generally used in conjunction with STRETCH, to prevent a gadget from getting undesirably large. The max size must be larger than both the minimum and preferred size, if specified.

def setMaxWidth(

self, w)

Set the maximum width of a gadget, in UI units.

Generally used in conjunction with STRETCH, to prevent a gadget from getting undesirably large. The max width must be larger than both the minimum and preferred width, if specified.

def setMinHeight(

self, h)

Set the minimum height of the gadget, in UI units. The gadget will never shrink to smaller than this size.

def setMinSize(

self, w, h)

Set the minimum size of the gadget, in UI units. The gadget will never shrink to smaller than this size.

def setMinWidth(

self, w)

Set the minimum width of the gadget, in UI units. The gadget will never shrink to smaller than this size.

def setName(

self, name)

def setNamingScheme(

self, uiScriptNamingScheme)

Specify the naming scheme used

No effect when only 1 component

def setNumComponents(

self, num_components)

Specify the number of values stored

def setPrefHeight(

self, h)

Set the preferred height of the gadget, in UI units. The preferred height is the height the gadget would like to be laid out at, if space is available.

If a min and preferred height are specified, but no stretch is set, the height will still float between the min and preferred height. The preferred height must be between the min and max heights, if specified.

def setPrefSize(

self, w, h)

Set the preferred size of the gadget, in UI units. The preferred size is the size the gadget would like to be laid out at, if space is available.

If a min and preferred size are specified for the same dimension, but no stretch is set, the size will still float between the min and preferred size. The preferred size must be between the min and max sizes, if specified.

def setPrefWidth(

self, w)

Set the preferred width of the gadget, in UI units. The preferred width is the width the gadget would like to be laid out at, if space is available.

If a min and preferred width are specified, but no stretch is set, the width will still float between the min and preferred width. The preferred width must be between the min and max width, if specified.

def setScriptCallback(

self, callback_string)

Set the callback script to provided string. This script will run in response to gadget changes.

Note Currently only python callbacks are supported. hscript can be used via hou.hscript()

def setSize(

self, w, h)

Specify a fixed size for the gadget, in UI units Pixels can also be used by suffixing the value with 'p' (ie, 20p).

One UI unit is about 90p. Fixed sized gadgets ignore any stretch attributes applied to them.

def setSpacing(

self, hv)

setSpacing(s) or 'setSpacing((h,v))

Sets the spacing between children in a container, in UI units. The second signature can be used for cell layouts.

Ignored for overlap layouts.

def setStretch(

self, h=1, v=1)

Makes the gadget stretchable in both directions. Specify floating point values for the amount of stretchiness: 0 being none and 1 being normal.

All stretchiness values are relative to one another within the same container. A gadget with stretchiness of 2 would stretch twice as much as one of stretchiness 1; the same would occur if they were assigned as 1 and 0.5.

def setTitle(

self, title)

def setUiScriptGadgets(

self, UiScriptGadgets)

Replace the UiScriptGadgets inside this container with a new sequence of UiScriptGadgets.

def setVMargin(

self, vm)

Sets the vertical margins around the child gadget area in a container, in UI units.

def setVStretch(

self, v)

Makes the gadget stretchable vertically. Specify floating point values for the amount of stretchiness: 0 being none and 1 being normal.

def setValue(

self, val)

def setWidth(

self, w)

Specify a fixed width for the gadget, in UI units.

Any horizontal stretch is ignored, though the gadget can still stretch verically.

def size(

self)

Returns the fixed size for the gadget, in UI units Values suffixed with 'p' (ie, 20p) are specified in pixels.

One UI unit is about 90p. Fixed sized gadgets ignore any stretch attributes applied to them.

def spacing(

self)

Returns spacing between children in a container, in UI units.

def stretch(

self)

Returns the gadget stretchiness values in both directions. 0 being none and 1 being normal.

def title(

self)

def type(

self)

def uiScriptGadgets(

self)

Return a tuple of UI Script Gadgets stored inside this container.

def vMargin(

self)

Returns the vertical margins around the child gadget area in a container, in UI units.

def vStretch(

self)

Returns the gadget stretchiness value vertically. 0 being none and 1 being normal.

def value(

self)

def width(

self)

Returns the fixed width for the gadget, in UI units

Any horizontal stretch is ignored, though the gadget can still stretch verically.


Documentation generated by pdoc 0.2.3. pdoc is in the public domain with the UNLICENSE.