Houdini 11 Houdini Object Model hou

Describes a parameter tuple containing string values. These values can be arbitrary strings or references to files or nodes

Note that string parameters may also be menu parameters. String parameters with menus are different from hou.MenuParmTemplate objects because menu parm templates evaluate to integers.

Methods

Inherited from hou.ParmTemplate: asCode, clone, dataType, disableWhen, help, hide, hideLabel, isHidden, isLabelHidden, joinWithNext, joinsWithNext, label, look, name, namingScheme, numComponents, scriptCallback, scriptCallbackLanguage, setDisableWhen, setHelp, setJoinWithNext, setLabel, setLook, setName, setNamingScheme, setNumComponents, setScriptCallback, setScriptCallbackLanguage, setTags, tags, type

__init__Construct a new StringParmTemplate.
defaultValueReturn the default value for new parameter instances.
iconNamesReturn the tuple of icons corresponding to the menu items. If there are no icons, returns a tuple of empty strings.
itemGeneratorScriptReturn the script used to generate menu items, or an empty string if there is no such script.
itemGeneratorScriptLanguageReturn the script used to generate menu items, or an empty string if there is no such script.
menuItemsReturn the tuple of internal menu names. If this string does not use a menu, returns an empty tuple.
menuLabelsReturn the tuple of menu labels displayed in the UI. These labels are used when this parm template uses a menu.
menuLabelsReturn the tuple of menu labels displayed in the UI.
menuTypeReturn the type of menu. See hou.menuType for more information.
setDefaultValueSet the default value for new parameter instances to a sequence of strings.
setIconNamesSet the icon names to the given sequence of strings.
setItemGeneratorScriptSet the script used to generate menu items.
setItemGeneratorScriptLanguageSet the script language used to generate menu items to a hou.scriptLanguage enum value.
setMenuItemsSet the internal menu names to the given sequence of strings.
setMenuTypeSet the type of menu to a hou.menuType enum value.
setStringTypeSet the type of this string parameter to a hou.stringParmType enum value.
stringTypeReturn the type of this string parameter. This type determines whether the parameter has special selection controls to choose a file path or the paths to one or more nodes.
__init__(self, name, label, num_components, default_value=(), naming_scheme=hou.parmNamingScheme.Base1, string_type=hou.stringParmType.Regular, menu_items=(), menu_labels=(), icon_names=(), item_generator_script=None, item_generator_script_language=None, menu_type=hou.menuType.Normal, disable_when=None, is_hidden=False, is_label_hidden=False, join_with_next=False, help=None, script_callback=None, script_callback_language=hou.scriptLanguage.Hscript, tags={})

Construct a new StringParmTemplate.

name

See hou.ParmTemplate.name for more information.

label

See hou.ParmTemplate.label for more information.

num_components

See hou.ParmTemplate.numComponents for more information.

default_value

See the defaultValue method for more information.

string_type

See the stringType method for more information. This parameter determines whether the parm template is for arbitrary strings, node references, or file references.

look

See hou.ParmTemplate.look for more information.

naming_scheme

See hou.ParmTemplate.namingScheme for more information.

menu_items

See the menuItems method for more information. Note that num_components must be 1 if menu items are supplied.

menu_labels

See the menuLabels method for more information.

If this parameter is not given, it defaults to the value of the menu_items parameter.

icon_names

See the iconNames method for more information.

If this parameter is an empty tuple, the menu will not contain icons.

item_generator_script

See the itemGeneratorScript method for more information. for more information. Note that num_components must be 1 if a script is given.

item_generator_script_language

See the itemGeneratorScriptLanguage method for more information. If this parameter is None it defaults to hou.scriptLanguage.Python.

menu_type

See the menuType method for more information.

disable_when

See hou.ParmTemplate.disableWhen for more information.

is_hidden

See hou.ParmTemplate.isHidden for more information.

is_label_hidden

See hou.ParmTemplate.isLabelHidden for more information.

join_with_next

See hou.ParmTemplate.joinsWithNext for more information.

help

See hou.ParmTemplate.help for more information.

script_callback

See hou.ParmTemplate.scriptCallback for more information.

script_callback_language

See hou.ParmTemplate.scriptCallbackLanguage for more information.

tags

See hou.ParmTemplate.tags for more information.

defaultValue(self) → tuple of str

Return the default value for new parameter instances.

The number of strings in the return value is the same as the number of components in the parm template.

setDefaultValue(self, default_value)

Set the default value for new parameter instances to a sequence of strings.

See the defaultValue method for more information. Note that if the number of strings in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing values will become the last value in the sequence or an empty string if the sequence is empty.

stringType(self) hou.stringParmType enum value

Return the type of this string parameter. This type determines whether the parameter has special selection controls to choose a file path or the paths to one or more nodes.

See hou.stringParmType for more information.

setStringType(self, string_type)

Set the type of this string parameter to a hou.stringParmType enum value.

See the stringType method for more information.

Return the tuple of internal menu names. If this string does not use a menu, returns an empty tuple.

These internal menu names are not displayed in the UI, but they can be passed to hou.Parm.set and will be returned by hou.Parm.evalAsString for menu parameters.

setMenuItems(self, menu_items)

Set the internal menu names to the given sequence of strings.

See the menuItems method for more information.

If the new number of menu items is less than the old number, the menu labels will be shortened and the default value will be modified if it is out of range.

Return the tuple of menu labels displayed in the UI. These labels are used when this parm template uses a menu.

Return the tuple of menu labels displayed in the UI.

iconNames(self) tuple of str

Return the tuple of icons corresponding to the menu items. If there are no icons, returns a tuple of empty strings.

These icons are used when this parm template uses a menu.

setIconNames(self, icon_names)

Set the icon names to the given sequence of strings.

itemGeneratorScript(self) str

Return the script used to generate menu items, or an empty string if there is no such script.

This script is used when this parm template uses a menu.

Note that if the item generator script language is hou.scriptLanguage.Python, this script may be either a single-line Python expression or a multi-line body of a Python function.

setItemGeneratorScript(self, item_generator_script)

Set the script used to generate menu items.

See the itemGeneratorScript method for more information.

itemGeneratorScriptLanguage(self) hou.scriptLanguage enum value

Return the script used to generate menu items, or an empty string if there is no such script.

setItemGeneratorScriptLanguage(self, language)

Set the script language used to generate menu items to a hou.scriptLanguage enum value.

See the itemGeneratorScriptLanguage method for more information.

Return the type of menu. See hou.menuType for more information.

setMenuType(self, menu_type)

Set the type of menu to a hou.menuType enum value.

See the menuType method for more information.

Superclasses