Render Dependencies

The function GetSortedDependencyList() provides the information needed to obtain the names of any other nodes a Render node depends on. For example, the following script returns the names of a Render node’s dependencies, as a sequence:

def dependencyList(nodeName): """ Use GetSortedDependencyList to retrieve the entire dependency tree for a render node. Each entry is ordered so that render nodes are sorted by number of dependencies, in descending order. """ # Get hold of the node and all of its dependencies as a sequence of dictionaries node = NodegraphAPI.GetNode(nodeName) info = FarmAPI.GetSortedDependencyList( [ node ] ) # Extract the 'deps' for each entry in the sequence # to produce a flat list. allDeps = [ dep for i in info for dep in i["deps"] ] return allDeps