A gallery entry is an entity containing data about an operator node setup. It has information about the node’s parameter values, any additional spare parameters, channels, and for subnet nodes the information about the children, etc. Thus, a gallery entry is like a node template or a parameter preset. Such templates can be created from and applied to existing nodes.
A gallery entry is identified by a unique, and has a non-unique label, and is usually associated with a specific hou.NodeType (or several node types) of the nodes to which it applies. In addition to the node information, gallery entries can have own categories that organize them into manageable sets and also can have keywords that identify their purpose. For more information about gallery entries, please see a gallery entry editor.
In order for your gallery entries to appear in the Material Palette pane, they must satisfy two conditions. First, the node category must be set to indicate the gallery entry creates a SHOP node. Use code like:
The second condition is that the entry must contain one or more keywords that indicate what renderer the SHOP works with. This affects whether the gallery entry appears when a specific renderer is chosen in the Material Palette renderer menu. Even if “All” is chosen in that menu, the gallery entry must contain a keyword that matches one of the renderers that appears in that menu. To associate a gallery entry with the Mantra renderer, do the following:
In HOM the gallery entries can be managed using hou.Gallery.
True if this gallery entry wants to let Houdini regenerate the
icon for it automatically using an appropriate renderer. Only applies to
material gallery entries.
Apply the gallery entry to a given node. This method sets the node’s parameter values to match the ones stored by the entry. It may also add spare parameters and channels to the node and for the subnets, it may create new child nodes.
A node to which to apply the gallery entry.
→ NodeType or None
Return a best node type which this gallery entry is associated with and whose nodes it can be applied to.
True if this gallery entry can be safely applied to the given node.
See hou.GalleryEntry.applyToNode() for more info.
A node to test whether the gallery entry can be applied to.
True if hou.GalleryEntry.createChildNode() can succeed.
→ tuple of strings
Return the categories this gallery entry subscribes to.
Create a new node in the parent network and then apply this gallery entry to that newly created node.
A subnetwork within which the new node should be created. If
an implicit natural parent is chosen using a node type this
gallery entry is associated with.
Return a description of the gallery entry. A description is a short string that states the gallery entry purpose. It is used for tool-tip pop-ups.
Return the URL of the help document for this gallery entry.
Return the icon name or a icon file path that should be used for this gallery entry.
→ tuple of strings
Return the keywords that describe this gallery entry.
Return the gallery entry label.
Return the gallery entry name.
Return the category of the node types this gallery entry is associated with.
→ tuple of strings
Return the names of the node type this gallery is associated with. The gallery can be safely applied to the nodes of these types.
Return a file path to an HDA library that should be loaded before trying to apply this gallery entry. It is often used for gallery entries associated with a non-native operator type.
Return a script that modifies the node parameters to match the information stored in the gallery entry.
Sets the allow icon regeneration flag on this gallery entry.
Set the categories this gallery entry subscribes to.
A string with comma separated categories to set the gallery entry to.
Save the information about the node contents (i.e., child nodes). When applying the node entry later on, these nodes will be reconstructed in a new parent to match the contents of the current parent.
The parent of the nodes whose data should be saved.
Set the description of the gallery entry.
The text briefly describing the gallery entry purpose.
Set this gallery entry to be exactly the same as the given entry, except for the name, which is left unchanged.
The gallery entry to copy the information from.
Set the URL of the help document for this gallery entry.
Set the icon name or an icon file path that should be used for this gallery entry.
Set the keywords that describe this gallery entry.
A string containing a white-space separated list of keywords.
Set the gallery entry label.
The label string.
Set the gallery entry name.
The name string.
Set the category of the node types this gallery entry should be associated with.
A hou.NodeTypeCategory to associate this gallery entry with.
Set the names of the node types this gallery should be associated with.
A string containing white-space separated list of node type names.
Set a file path to an HDA library on which this gallery entry depends.
A path of the HDA library file (OTL).
Set a script that modifies the parameters when the gallery entry is applied to a node.
A string that contains the commands setting the node’s parameters.
Set a script that modifies node parameters. Later on, when applying this gallery entry to a node, the script will reconstruct that node’s parameters to match exactly the parameters of a node passed to this method.
A node object from which to build the script.