hou.galleries
module
Functions
createGalleryEntry(gallery_path, entry_name, node)→ hou.Gallery orNonegalleries()→ tuple of hou.GallerygalleryEntries(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_patterngallery entry names matching this pattern
label_patterngallery entry label names matching this pattern
keyword_patterngallery entries that have a keyword matching this pattern
categorygallery entries in a category matching this pattern
node_typegallery 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 orNone