Function Overview |
The following methods are exposed as part of MARI Extension Pack 4 to provide easy access to
frequently used python procedures.
The methods are part of the class
mari.ExtensionPack.utils()
Will return the Mari Main Window Object
Returns:
Mari Main Window Object
This will set the Focus and Mari Context to the Nodegraph, meaning that hotkeys executed by the user will be run in 'Nodegraph Context'
if hotkeys have been defined.
This is useful to return context to the Nodegraph after a dialog was launched and closed from within the Nodegraph, since otherwise
the Context sits on the Mari Main Window
Returns:
None
Returns the currently open nodegraph (root or graph group)
Returns:
mari.NodeGraph() Object
Returns a list of all Graph Group Nodes found in a given list of nodes.
If the list includes Graph Group Nodes, the contents of these Graph Groups
are recursively checked for Group Nodes as well.
Parameters:
A list of mari.Node objects
Returns:
List of mari.GroupNode() objects
Returns a list of all Nodes found in a given list of nodes.
If the list includes Graph Group Nodes, the contents of these Graph Groups
are added to the returned list as well (recursively).
Parameters:
A list of mari.Node objects
Returns:
List of mari.Node() objects
Returns a list of all Nodes found connected to the Output of the specified Node
When skipDotNodes is True the method will keep traversing downstream until
a node other than a dot node is found.
Parameters:
the Nodegraph to search in
The Node you want to find Output Connections for.
Returns:
List of mari.Node() objects
Returns a list of all channels that the given node_to_find belongs to.
Parameters:
the Node we want to find out what Channel it belongs to
the geometry the node_to_find lives on
If excludeDownStreamChannelLayerUse is True, the search will only go up to the first downstream hierarchy level
of channels, and not further (ignoring for example cases where a whole channel is used in another channel)
Returns:
List of mari.Channel() Objects
Returns selected Nodes in the Root Graph of the Current Geometry
Parameters:
If True only the first node is returned
Returns:
List of mari.Node() Objects or a single mari.Node() Object if parameter is True
Returns all Nodes upstream that are connected to a given target Node
Parameters:
The Node to find upstream Nodes from
The Nodegraph the targetNode lives in
If GroupContentMode = 'Include Group Node Content' and a node upstream from the targetNode is a GraphGroup,
all Nodes (recursively) inside the Group are returned as well
Otherwise only the Graph Group Node is included.
If returnBakePointUpstream is False nodes upstream from bake points will only be returned if the bake point is
disabled or does not useBake()
If includeTargetNode is True, the targetNode is included in the return statement of the method
Returns:
List of mari.Node() Objects
Created with the Personal Edition of HelpNDoc: What is a Help Authoring tool?