Provides the selected nodes.
|
OMC::node * | operator[] (int idx) const |
| Returns a string that represents the flavor of the application. e.g. Harmony.
|
|
bool | contains (OMC::Node *) const |
| Identifies if the list contains the node (or subnode).
|
|
virtual std::vector< OMC::Node * > | list () const override |
| Converts the dynamic list into a concrete list of node objects.
|
|
virtual OMC::Node * | operator() (const QVariant &searchString) const |
| Search for a node in the selection with a specialized search object. More...
|
|
virtual OMC::Node * | find (const QVariant &searchString) const |
| Search for a node in the selection with a specialized search object. More...
|
|
virtual void | add (const QVariant &node) |
| Add a node to the selection. More...
|
|
virtual void | remove (const QVariant &node) |
| Remove a node from the selection. More...
|
|
void | select_all () |
| Selects all nodes in the scene.
|
|
void | select_none () |
| Removes all nodes from the selection.
|
|
virtual OMC::Node* OMH::SelectionNodeList::operator() |
( |
const QVariant & |
searchString | ) |
const |
|
virtual |
Search for a node in the selection with a specialized search object.
Using the same approach as the OMC::NodeList::find, uses a custom object to find nodes within the selection.
Using a custom search object in form:
{
"name" : "NameOfNode"
"path" : "PathOfNode"
"type" : "TypeOfNode"
}
Each property in the map is optional. Providing a specific property will search the node list for nodes that match that property.
The matching type can be a string type, or a regular expression and can be provided as a list of potential matches.
Finding all Pegs:
from ToonBoom import harmony
sess = harmony.session()
scn = sess.project.scene
nodes = scn.nodes
nodes.find( {"name":"Drawing-P"})
nodes.find( {"type":"PEG"})
nodes.find( {"path":"^Top/.+?/.*$"} )
nodes.find( {"path":"^Top/.+?/.*$", "type":"PEG"} )
nodes.find( { "type" : ["READ", "PEG"] } )
from PySide6 import QtCore
nodes.find( { "name" : QtCore.QRegularExpression("^.+_TEXTURE$", QtCore.QRegularExpression.CaseInsensitiveOption) } )
- Returns
- The node(s) found based on the provided search object.