nodegraphutils module

class nodegraphutils.ConnectionReplacement(outputitem, inputindex, inputitem=None, outputindex=None)

Bases: object

createConnection()
class nodegraphutils.EditorUpdates

Bases: object

addOverlayShapes(shapes)
addShapes(shapes)
applyToEditor(editor)
clear()
combine(other)
setAdjustments(items, values)
setOverlayShapes(shapes)
setShapes(shapes)
nodegraphutils.addBorderCursors(cursor_map, name)
nodegraphutils.adjustNetworkAroundNetworkBox(netbox, new_minimized)
nodegraphutils.buildMenu(menu, title, menuitems)
nodegraphutils.cleanupDisconnectedItems(net)
nodegraphutils.createFileNode(editor)
nodegraphutils.createNestedChannelGroups(nodes)
nodegraphutils.createNetworkBox(editor, containitems)
nodegraphutils.deleteAllDots(net, recursive)
nodegraphutils.deleteChannels(nodes, single_node)
nodegraphutils.deleteConnections(connections, update_unpinned_dots=True)
nodegraphutils.deleteSelected(editor, delete_netbox_contents)
nodegraphutils.exposeWireStubBundle(stub_wire, stub_name)
nodegraphutils.filterExternal(node, refs, editor)
nodegraphutils.findExclusiveInputNodes(endnode)
nodegraphutils.findOutputNodes(item)

Given a hou.NetworkMovableItem, returns a list of nodes connected as outputs to the item. Dots are traversed through to find nodes, but the traversal down a given path stops when it hits a node. Returns an empty list if no nodes can be found along any output path.

nodegraphutils.getAllConnectedItems(item, connected_items, ignore_items=set([]))
nodegraphutils.getConnection(item, index)
nodegraphutils.getConnectorDistanceBeforeSnapping()
nodegraphutils.getConnectorSnapRadius(editor)
nodegraphutils.getCursorMap()
nodegraphutils.getDefaultDropTargetSize()
nodegraphutils.getDefaultScale()
nodegraphutils.getDefaultStickyNoteTextSize()
nodegraphutils.getDefaultTabMenuKey()
nodegraphutils.getDragPanScale()
nodegraphutils.getDropTargetRadius(editor)
nodegraphutils.getErrorString(node)
nodegraphutils.getExternalConnections(items, inputs=True, outputs=True)
nodegraphutils.getExternalDependents(node, editor)
nodegraphutils.getExternalReferences(node, editor)
nodegraphutils.getFlagDescription(category, flag)
nodegraphutils.getFlagEnum(uidata)
nodegraphutils.getFootprints(category)
nodegraphutils.getInputsRecursive(item, itemset, depthfirstlist=None)
nodegraphutils.getInternalConnections(items)
nodegraphutils.getMaxNumInputs(item)
nodegraphutils.getMaxNumOutputs(item)
nodegraphutils.getMinimumItemSize()
nodegraphutils.getNetworkBoxMargins()
nodegraphutils.getNetworkBoxUnderMouse(editor, pos)
nodegraphutils.getNewNodeHalfSize()
nodegraphutils.getNextInputIndex(item)
nodegraphutils.getNextOutputIndex(item)
nodegraphutils.getNodeMoveTime(editor)
nodegraphutils.getNodeNameForFileName(file_path)
nodegraphutils.getNodeSpacing()
nodegraphutils.getOutputsRecursive(item, itemset, depthfirstlist=None)
nodegraphutils.getPaletteFileName()
nodegraphutils.getPopupMenuResult(menu_provider)
nodegraphutils.getPossibleDropTargets(uievent, radius, exclude_items=None)
nodegraphutils.getPromptWithNoHandler(uievent)
nodegraphutils.getReplacementConnections(connections, items)
nodegraphutils.getResizeDirection(border_index)
nodegraphutils.getScaleStep()
nodegraphutils.getSelectedItems(editor, primary_item=None, allowed_classes=())
nodegraphutils.getSelectedWires(editor, picked_wire=None)
nodegraphutils.getShakeDistance(editor)
nodegraphutils.getSnapRadius(editor)
nodegraphutils.getSwipeDistance()
nodegraphutils.getTooltip(uievent)
nodegraphutils.getViewUpdateTime(editor)
nodegraphutils.getWireStubBundle(connection, stubtype, include_exclusive_inputs=False)
nodegraphutils.insertItemsIntoWire(conn, items)
nodegraphutils.isNetworkHorizontal(network)
nodegraphutils.loadBackgroundImages(node)
nodegraphutils.moveItemsToLocation(editor, pos, mousepos)
nodegraphutils.moveNodesToAvoidOverlap(editor, avoid_nodes)

Moves nodes around to avoid having conneted nodes overlapping each other. It will only move ouputs of the “avoid_nodes”, and the “avoid_nodes” themselves (to avoid overlapping their inputs). The “avoid_nodes” always move as a block, and the ouputs move as a block. So it’s really just moving two blocks of items to avoid each other and a third block of items. The positions are animated to provide a nice smooth transition.

nodegraphutils.pasteItems(editor)
nodegraphutils.rotateInputs(node)
nodegraphutils.saveBackgroundImages(node, images)
nodegraphutils.saveParentNetworkBoxSizes(editor, netbox_child)
nodegraphutils.scopeChannels(nodes)
nodegraphutils.setMinimized(editor, item, minimized, adjust_network)
nodegraphutils.shrinkNetworkBoxesToFit(editor, netboxes)
nodegraphutils.updateCurrentItem(editor)