soputils module¶
-
soputils.
actionToggleVisualizer
(kwargs)¶ Toggles the visibility of attribute pointed to by kwargs[‘parmtuple’] on the node kwargs[‘node’]. Meant to be used in action buttons to enable simple attribute visualization.
Use kwargs[‘attribname’] to explicitly provide an attribute name instead of evaluating the parm tuple.
-
soputils.
compactPaths
(paths, all_paths)¶
-
soputils.
convertObjectPathToSelection
(geo, object_path)¶
-
soputils.
convertSelectionToObjectPath
(geo, sel)¶
-
soputils.
findVisualizer
(attrib, category, node)¶ Finds a visualizer for an attribute of the given name. Returned visualizer will be in the provided category (node needs to be specified for node visualizers). Returns None if no such visualizer exists.
-
soputils.
geometryTypeFromGroupTypeParm
(parmval)¶ Convert a value from a group type parameter into a hou.geometryType.
-
soputils.
getDefaultState
(node_type)¶
-
soputils.
getMatchLength
(p1, p2)¶
-
soputils.
groupTypeParmFromGeometryType
(geotype, parmtuple)¶
-
soputils.
restoreViewportState
(pane, node, state)¶
-
soputils.
selectAlembicPaths
(kwargs)¶ Function for selecting Alembic Object Path parameters for the Alembic SOP. Similar in concept to the selectGroupParm function, but with a few tweaks. The Select Group flag is always turned on, and the Group MAsk set to @path. One the selection is complete, the selected alembic paths are compared to the complete list of alembic paths for the geometry, and a minimal set of paths is generated which will include all selected geometry, and no unselected geometry.
-
soputils.
selectGroupParm
(kwargs)¶ Performs a selection that is used to populate a SOP Group parameter field. This function takes a number of kwargs options to control the exact form of the returned selection, how the parameter should be set, the allowed selection types, etc. If kwargs[‘ordered’] is present, then that alone specifies whether to do an ordered selection. If kwargs[‘ordered’] is not present, then we try to determine orderedness from any selector bound to the node and parameter in question, and, failing that, default to an unordered selection.
-
soputils.
selectMaterialGroupParm
(kwargs)¶ Similar to the selectGroupParm function above, but with some tweaks that make it specific to the Material SOP. It always does a primitive selection. It always activates group select mode. The Group Mask is set based on the availability of the path attribute, then user-defined groups, and falling back to polygon connectivity if no other options are available.
-
soputils.
setupVisualizer
(viz, attrib, aclass)¶ Guesses the appropriate settings for the given attribute and sets up the visualizer accordingly.
-
soputils.
showError
(msg)¶
-
soputils.
stashViewportState
(pane, node, state)¶ Stash viewport options that we want to restore after a selection is completed.
-
soputils.
toggleVisualizer
(node, attribname, attribclass, category, viewport)¶ This function toggles visibility of an attribute visualizer. If a visualizer does not exist, a new one is created with appropriate settings. attribclass should be one of ‘vertices’, ‘points’, ‘primitives’, or ‘detail’.
-
soputils.
turnOffVisualizers
(vtype, category, node, viewport)¶ Turns off all visualizers that are of the given type and category.