hou.HDADefinition class
Represents the definition of a digital asset.
See also: hou.HDAOptions
Methods
addParmFolder(self, folder_name, in_folder=(), parm_name=None, create_missing_folders=False)-
Adds a folder to the parameters.
Note that all the folders in a set correspond to one parameter. If this is the first folder to go in the set, parm_name will be used as the parameter name. Otherwise, parm_name will be ignored and the parameter name of the first folder in the set is used.
If this is the first folder in the set and parm_name is None, it will default to 'folder0'. If parm_name is already in use, a unique name will be automatically generated.
if create_missing_folders is True, this method will create the folders in in_folder that don’t exist. So, this method can be used to add spare folders and a spare parameter at the same time.
addParmTuple(self, parm_template, in_folder=(), create_missing_folders=False)addSection(self, name, contents="")→ HDASectionaddSectionFromFile(self, section_name, file_name)→ HDASectioncomment(self)→ stringcopyToHDAFile(self, file_name, new_name=None, new_menu_name=None)-
Copies an HDA definition into an operator type library.
The file_name parameter specifies the name of the operator type library file to which the data should be copied. If a definition for the specified operator already exists in the destination file, it is overwritten.
The new_name parameter can be used to specify a new name for the copied operator type. This lets you create a new operator type using an existing type as a starting point.
The new_menu_name parameter can be used to specify a new description for the operator type. If the new_menu_name parameter is set without setting new_name, the new operator type definition will still conflict with an existing definition of the same name.
destroy(self)embeddedHelp(self)→str-
Returns help text embedded in the digital asset. Returns an empty string if no embedded help exists.
Embedded help typically comes from the Help tab of the operator type properties window, but it may also come from a dialog script.
extraInfo(self)→ stringhideDefaultParameters(self) -> boolicon(self)→ stringisCurrent(self)→bool-
Return whether this definition is the one currently in use by Houdini.
isInstalled(self)→bool-
Return whether this definition is installed in Houdini.
isPreferred(self)→boollibraryFilePath(self)→ stringmaxNumInputs(self)→ intminNumInputs(self)→ intmodificationTime(self)→ datetime.datetimenodeType(self)→ NodeTypenodeTypeCategory(self)→ NodeTypeCategorynodeTypeName(self)→ stringoptions(self)→ hou.HDAOptions-
Return the options set on the HDA in an HDAOptions object.
reloadSectionsFromFiles(self)removeParmFolder(self, folder)-
Removes an empty folder from the parameters.
folder
A sequence of folder names. So, to remove the Output folder, pass in
("Output",)instead of"Output". removeParmTuple(self, name)removeSection(self, name)representativeNodePath(self) -> stringsave(self, file_name, template_node=None, options=None)-
Save the HDA into an operator type library file.
All the data needed to define the operator type is included in the library. Any number of operator types can be included in a single library.
If a template node is given, the contents of the node are made part of the operator type definition.
An optional HDAOptions object can be given to further specify how the operator type should behave. When using a template node, the options used are compressContents, lockContents, and makeInitialParmsDefaults. When not using a template node, only the compressContents option is used.
sections(self)→ dict of strings to HDASectionssetComment(self, comment)setExtraInfo(self, extra_info)setIcon(self, icon)setInformation(self, icon=None, mininputs=0, maxinputs=0, maxoutputs=1, extrainfo=None, modtime=now)setIsPreferred(self, preferred)setMaxNumInputs(self, max_num_inputs)setMinNumInputs(self, min_num_inputs)setModificationTime(self, modification_time=None)setOptions(self, options)-
Set options on the HDA.
setVersion(self, version)updateFromNode(self, node)-
Update the definition using the given node. The contents of the node are made part of the definition.
version(self)→ string