meshroom.core.graph.Graph

Inheritance diagram of meshroom.core.graph.Graph
class meshroom.core.graph.Graph(name, parent=None)

_________________ _________________ _________________ | | | | | | | Node A | | Node B | | Node C | | | edge | | edge | | |input output|>—->|input output|>—->|input output| |_______________| |_______________| |_______________|

Data structures:

nodes = {‘A’: <nodeA>, ‘B’: <nodeB>, ‘C’: <nodeC>} edges = {B.input: A.output, C.input: B.output,}

__init__(name, parent=None)

Methods

__init__(name[, parent])

addEdge(*args, **kwargs)

addEdges(*edges)

addNewNode(nodeType[, name, position])

Create and add a new node to the graph.

addNode(node[, uniqueName])

Add the given node to this Graph with an optional unique name, and resolve attributes expressions.

asString(**f_kwargs)

attribute(**f_kwargs)

canCompute(**f_kwargs)

canSubmitOrCompute(**f_kwargs)

clear()

clearLocallySubmittedNodes()

Reset the status of already locally submitted nodes to Status.NONE

clearSubmittedNodes(**f_kwargs)

copyNode(srcNode[, withEdges])

Get a copy instance of a node outside the graph.

dfs(visitor[, startNodes, longestPathFirst])

dfsMaxEdgeLength([startNodes, dependenciesOnly])

param startNodes:

list of starting nodes. Use all leaves if empty.

dfsOnDiscover([startNodes, filterTypes, ...])

Return the node chain from startNodes to the graph roots/leaves.

dfsOnFinish([startNodes, longestPathFirst, ...])

Return the node chain from startNodes to the graph roots/leaves.

dfsToProcess([startNodes])

Return the full list of predecessor nodes to process in order to compute the given nodes.

dfsVisit(u, visitor, colors, nodeChildren, ...)

duplicateNodes(srcNodes)

Duplicate nodes in the graph with their connections.

edge(dstAttributeName)

findInitNodes()

Returns:

findNode(nodeExpr)

findNodeCandidates(nodeNameExpr)

findNodes(nodesExpr)

flowEdges([startNodes, dependenciesOnly])

Return as few edges as possible, such that if there is a directed path from one vertex to another in the original graph, there is also such a path in the reduction.

forceUnlockNodes(**f_kwargs)

getChunks([nodes])

Returns the list of NodeChunks for the given list of nodes (for all nodes if nodes is None)

getChunksByStatus(status)

Return the list of NodeChunks with the given status

getDepth(node[, minimal])

Return node's depth in this Graph.

getEdges([dependenciesOnly])

getInputEdges(node, dependenciesOnly)

getInputNodes(node, recursive, dependenciesOnly)

Return either the first level input nodes of a node or the whole chain.

getLeafNodes(dependenciesOnly)

getNodeIndexFromName(name)

Nodes are created with a suffix index; returns this index by parsing node name.

getNonDefaultInputAttributes()

Instead of getting all the inputs and internal attribute keys, only get the keys of the attributes whose value is not the default one.

getOrderedChunks()

Get chunks as visited by dfsOnFinish.

getOutputNodes(node, recursive, dependenciesOnly)

Return either the first level output nodes of a node or the whole chain.

getRootNodes(dependenciesOnly)

internalAttribute(**f_kwargs)

iterChunksByStatus(status)

Iterate over NodeChunks with the given status

load(**f_kwargs)

markNodesDirty(fromNode)

Mark all nodes following 'fromNode' as dirty.

node(nodeName)

nodeInEdges(node)

Return the list of edges arriving to this node

nodeOutEdges(node)

Return the list of edges starting from this node

nodesOfType(nodeType[, sortedByIndex])

Returns all Nodes of the given nodeType.

outEdges(attribute)

Return the list of edges starting from the given attribute

parent()

pasteNodes(data, position)

Paste node(s) in the graph with their connections.

removeEdge(*args, **kwargs)

removeNode(*args, **kwargs)

resetExternalLinks(attributes, nodeDesc, ...)

Reset all links to nodes that are not part of the nodes which are going to be imported: if there are links to nodes that are not in the list, then it means that the references are made to external nodes, and we want to get rid of those.

save([filepath, setupProjectFile, template])

setVerbose(v)

sortNodesByIndex(nodes)

Sort the given list of Nodes using the suffix index in their names.

stopExecution()

Request graph execution to be stopped by terminating running chunks

toDict()

update()

updateImportedProject(data)

Update the names and links of the project to import so that it can fit correctly in the existing graph.

updateInternals([startNodes, force])

updateLinks(attributes, nameCorrespondences)

Update all the links that refer to nodes that are going to be imported and whose names have to be updated.

updateNodesPerUid()

Update the duplicate nodes (sharing same uid) list of each node.

updateNodesTopologicalData()

Compute and cache nodes topological data:

updateStatisticsFromCache()

updateStatusFromCache([force])

upgradeAllNodes()

Upgrade all upgradable CompatibilityNode instances in the graph.

upgradeNode(nodeName)

Upgrade the CompatibilityNode identified as 'nodeName' Args: nodeName (str): the name of the CompatibilityNode to upgrade

Attributes

cacheDir

cacheDirChanged

The class signal allows a signal to be set on a class rather than an instance.

canComputeLeaves

canComputeLeavesChanged

The class signal allows a signal to be set on a class rather than an instance.

compatibilityNodes

edges

fileFeatures

Get loaded file supported features based on its version.

fileReleaseVersion

filepath

filepathChanged

The class signal allows a signal to be set on a class rather than an instance.

importedNodes

" Return the list of nodes that were added to the graph with the latest 'Import Project' action.

nodes

updateEnabled

updated

The class signal allows a signal to be set on a class rather than an instance.