loptoolutils module

loptoolutils.buildBlockPair(scriptargs, name, begintype, endtype, which_input)

Builds a pair of block nodes, a begin and an end, and links them together nicely.

which_input is the index of the input on the end node to which we should connect the begin node.

loptoolutils.createLopNode(container, nodetypename, inputnodes, nodename, exact_node_type, primstring=None)

Creates a LOP node inside the specified container network.

loptoolutils.createPointInstancer(kwargs, node_name, method, sourcemode='first')
loptoolutils.genericCameraLightTool(scriptargs, nodetypename, nodename=None, clicktoplace=None)

A generic function for creating Camera or Light nodes of various types. This tool handles the initialization of the node transforms to match the current view if the Ctrl key was used to invoke the tool.

loptoolutils.genericFilterTool(scriptargs, nodetypename, nodename, prompt=None, exact_node_type=True)

Creates a node that requires other nodes as input.

loptoolutils.genericGeneratorTool(scriptargs, nodetypename, nodename, clicktoplace, prompt=None, exact_node_type=True)

Creates a LOP generator node. The node is either created at the origin, or asks the user to select a location in the viewport depending on the value of the clicktoplace parameter.

loptoolutils.getLopNodeContainer(cwd)

Returns the closest ancestor that can contain LOPs. If one isn’t found in the hierarchy this returns hou.node(‘/stage’).

loptoolutils.saveViewToCamera(viewport, cam_lop)
loptoolutils.setTranslateAndRotate(lop, xform)