hou.galleries module

Functions

createGalleryEntry(gallery_path, entry_name, node)hou.Gallery or None

Not documented yet

galleries() → tuple of hou.Gallery

Not documented yet

galleryEntries(name_pattern=None, label_pattern=None, keyword_pattern=None, category=None, node_type=None) → tuple of hou.GalleryEntry

Return a tuple of hou.GalleryEntry objects matching the search criteria. The result is the intersection of the matches against all the parameters. If you call this function with no parameters, it returns all the gallery entries.

Unless a parameter is None, the results are filtered by the following:

name_pattern

gallery entry names matching this pattern

label_pattern

gallery entry label names matching this pattern

keyword_pattern

gallery entries that have a keyword matching this pattern

category

gallery entries in a category matching this pattern

node_type

gallery entries that can be applied to this node type

This example prints all the gallery entries starting with a “b” that have the Material keyword.

>>> hou.galleries.galleryEntries("b*", keyword_pattern="Material")
(<hou.GalleryEntry "basic_surface">, <hou.GalleryEntry "bumpy_glass">, ...)

This example prints the name and description of all the entries in the Metals category:

>>> for entry in hou.galleries.galleryEntries(category="Metals"):
...     print "%s: %s" % (entry.name(), entry.description())
chrome: Very bright metal with mirror reflections
aged_metal: Aged metal material with ray traced or environment mapped reflections
...

This example prints the gallery entry names for the lsystem SOP.

>>> node_type = hou.nodeType(hou.sopNodeTypeCategory(), "lsystem")
>>> for entry in hou.galleries.galleryEntries(node_type=node_type):
...     print entry.name()
planta
plantb
plantc
...
sympodial_tree
ternary_tree
wheel

installGallery(gallery_path)hou.Gallery or None

Not documented yet