Archived post by TOADSTORM

“`python import fnmatch import hou
def glob_attrs(geo, pattern): all_attrs = list() out_attrs = list() all_attrs.extend(geo.pointAttribs()) all_attrs.extend(geo.primAttribs()) all_attrs.extend(geo.vertexAttribs()) all_attrs.extend(geo.globalAttribs()) matches = [f for f in pattern.split() if not f.startswith(“^”)] excludes = [f.strip(“^”) for f in pattern.split() if f.startswith(“^”)] for attr in all_attrs: for pattern in matches: if fnmatch.fnmatch(attr.name(), pattern): out_attrs.append(attr) for pattern in excludes: if fnmatch.fnmatch(attr.name(), pattern): if attr in out_attrs: out_attrs.remove(attr) out_attrs = list(set(out_attrs)) return out_attrs “`

feed it a Geometry object and a pattern and it’ll return hou.Attribs

no guarantees it isn’t shit but it might help you