The contents of this object correspond to some of the checkboxes on the
Basic tab of the Type Properties dialog. These values are stored
in the TypePropertiesOptions
section of a digital asset definition.
Call hou.HDADefinition.options to get an HDAOptions instance. Note that an instance of this class is simply a data structure, and is not associated with an particular digital asset instance. In other words, changing the values inside this object will not change the digital asset. To save these values to the digital asset definition, call hou.HDADefinition.setOptions.
>>> node = hou.node("/obj/my_digital_asset1") >>> definition = node.type().definition() >>> print definition.sections()['TypePropertiesOptions'].contents() ParmsFromVfl := 0; PrefixDroppedParmName := 1; UseDSParms := 1; ForbidOutsideParms := 1; LockContents := 1; SaveSpareParms := 0; # <-- Currently 0 CheckExternal := 1; GzipContents := 1; MakeDefault := 1; PrefixDroppedParmLabel := 1; UnlockOnCreate := 0; >>> options = definition.options() >>> options.saveSpareParms() False >>> options.setSaveSpareParms(True) >>> definition.setOptions(options) >>> print definition.sections()['TypePropertiesOptions'].contents() ParmsFromVfl := 0; PrefixDroppedParmName := 1; UseDSParms := 1; ForbidOutsideParms := 1; LockContents := 1; SaveSpareParms := 1; # <-- Now 1 CheckExternal := 1; GzipContents := 1; MakeDefault := 1; PrefixDroppedParmLabel := 1; UnlockOnCreate := 0;
Methods ¶
__init__()
Create an HDAOptions object with default settings.
See the class documentation for more information.
checkForExternalLinks()
→ bool
Return whether the Check for External Node References option is set.
If set, this option changes all absolute node references inside the digital asset into relative references.
setCheckForExternalLinks(check_for_external_links)
Sets the Check for External Node References option. See hou.HDAOptions.checkForExternalLinks for more information.
forbidOutsideParms()
→ bool
Return whether the Forbid Linking Parameters from Outside this Subnet option is set.
When set, this option does not allow you to drag parameters from nodes outside the contents of the digital asset.
setForbidOutsideParms(forbid_outside_parms)
Sets the Forbid Linking Parameters from Outside this Subnet option. See hou.HDAOptions.forbidOutsideParms for more information.
lockContents()
→ bool
Return whether the Save Contents as Locked option is on.
When this option is not set, Houdini will use a creation script to store the contents of the digital asset instead of storing the node data. A creation script cannot store extra data like locked SOPs, edit SOP information, paint SOP information, etc.
If this option is not set, new instances of the digital asset will be locked, so the user can edit the contents. However, you probably do not ever want to turn this option off. Instead, if you want to lock new instances of the digital asset, see hou.HDAOptions.unlockNewInstances.
setLockContents(lock_contents)
Sets the Save Contents as Locked option. See hou.HDAOptions.lockContents for more information.
unlockNewInstances()
→ bool
Return whether the Unlock New Nodes on Creation option is set.
When this option is set, Houdini will unlock new instances of the digital
asset when they are created. Note that this option only has effect
when the result of hou.HDAOptions.lockContents is True
.
setUnlockNewInstances(unlock_new_instances)
Sets the Unlock New Nodes on Creation option. See hou.HDAOptions.unlockNewInstances for more information.
compressContents()
→ bool
Return whether the Compress Contents option is on.
When this option is set, Houdini compresses the contents of the asset
definition to reduce the size of the .hda file. Note that this option only
as effect when the result of hou.HDAOptions.lockContents is True
.
setCompressContents(compress_contents)
Sets the Compress Contents option. See hou.HDAOptions.compressContents for more information.
makeInitialParmsDefaults()
→ bool
Return whether the Save Defaults as Initial Parameters option is on.
When set, this option uses the default values of the original parameters as the initial values for new nodes, instead of their current values.
setMakeInitialParmsDefaults(make_initial_parms_defaults)
Sets the Save Defaults as Initial Parameters option. See hou.HDAOptions.makeInitialParmsDefaults for more information.
saveInitialParmsAndContents()
→ bool
Return whether the Save Initial Contents and Parameters option is on.
When this option is set, Houdini saves any parameter values and node contents referenced by the digital asset to be saved as part of the asset’s definition.
setSaveInitialParmsAndContents(save_initial_parms_and_contents)
Set the Save Initial Contents and Parameters option. See hou.HDAOptions.saveInitialParmsAndContents for more information.
saveSpareParms()
→ bool
Return the Save Spare Parameters option.
When set, this option will add code into the asset creation script to recreate the node’s current spare parameters. New node instances of the digital asset will contain the same spare parameters as those on the representative node.
setSaveSpareParms(save_spare_parms)
Set the Save Spare Parameters option. See hou.HDAOptions.saveSpareParms for more information.
saveCachedCode()
→ bool
Return the Save Cached Code option.
When set, this option will save cached code for applicable definitions, such as digital assets defined by VOP networks that generate VEX code. With this option on, the compiled code will be saved to the HDA section(s) and will be used for shaders, etc, without the need to recompile the network. This can save significant amounts of time for complex shaders.
setSaveCachedCode(save_cached_code)
Set the Save Cached Code option. See hou.HDAOptions.saveCachedCode for more information.
parametersFromVexCode()
→ bool
Return whether the Get Properties from VEX Code option is on.
When this option is set, most properties and parameters of the operator come from pragma statements in the VEX source code.
setParametersFromVexCode(parameters_from_vex_code)
Sets the Get Properties from VEX Code option. See hou.HDAOptions.parametersFromVexCode for more information.
prefixDroppedParmNames()
→ bool
Return whether the Prefix Dropped Parameter Names option is on.
When this option is set, Houdini will not include a prefix on parameter names when you drag and drop parameters into the Existing Parameters areas of the Parameters tab of the Type Properties dialog.
See also hou.HDAOptions.prefixDroppedParmLabels.
setPrefixDroppedParmNames(prefix_dropped_parm_names)
Sets the Prefix Dropped Parameter Names option. See hou.HDAOptions.prefixDroppedParmNames for more information.
prefixDroppedParmLabels()
→ bool
Return whether the Prefix Dropped Parameter Labels option is on.
When this option is set, Houdini will not include a prefix on parameter labels when you drag and drop parameters into the Existing Parameters areas of the Parameters tab of the Type Properties dialog.
See also hou.HDAOptions.prefixDroppedParmNames.
setPrefixDroppedParmLabels(prefix_dropped_parm_labels)
Sets the Prefix Dropped Parameter Labels option. See hou.HDAOptions.prefixDroppedParmLabels for more information.