On this page |
Overview ¶
The APEX path pattern syntax is a set of rules that allow you to filter and select specific elements within APEX graphs and the packed character format:
APEX graph elements
Rig component scripts use APEX path patterns to find specific groups of graph nodes and ports (via graph::FindNodes and graph::FindPorts). APEX path patterns can also be used to filter additional metadata on graph nodes in the form of tags and properties, which are used to mark and store data on nodes.
Packed character format
APEX path patterns are used in the Unpack Folder SOP to extract specific elements from the nested folder structure of the packed character format.
APEX path pattern syntax ¶
The rules of the APEX path pattern syntax are listed in the table below. The “hierarchy levels” mentioned in the table refer to nested subnets (for APEX graphs), and nested folder structures (for the packed character format).
Syntax |
Description |
---|---|
|
An asterisk matches any number of characters in a name. For example, |
|
Two asterisks matches any number of hierarchy levels. For example, |
|
Matches any single character. |
|
Matches any single character within the brackets. For example, |
|
Groups and attributes are put inside braces. For example, Note Pattern matching with groups and attributes are only supported for the packed character format, and not for graph elements. |
Combine patterns with |
Multiple patterns can be combined with the
|
|
Parentheses indicate the order of execution for combined patterns. For example, |
Graph ports ¶
Ports on APEX graph nodes can be filtered in the graph::FindPorts node using the following syntax:
<node_path>:<port_name>[in|out][<subport_name>]
-
The optional
[in]
/[out]
specifies whether the port is an input or output port on the node. -
The optional
[<subport_name>]
specifies the subport name of the variadic port<port_name>
.
For example, joint_*:xform[in][leg]
matches the subport named leg
on the xform input variadic port of any node with a name that starts with joint_
.
Tags ¶
Properties ¶
Properties on graph nodes store custom information that could be used at a later point in the graph. They are stored in a dictionary attribute called properties
. Users can add and modify data in the properties
dictionary using graph::UpdateNode and graph::UpdateNodeProperties.
The properties
dictionary also contains predefined entries that store information on control shapes, rig parameter limits, and rig/skeleton mapping. See properties for more information.
Note
Properties are only used for nodes; there are no port properties.
To view the properties on graph nodes:
-
In the geometry spreadsheet, select Points from the top toolbar.
-
click the entry under the properties column and select Inspect to view the properties dictionary.
Functions ¶
Functions perform specific filtering operations on graphs, graph nodes, and ports. Functions are not used in the packed character format.
In the APEX path pattern syntax, functions are preceded by a %
, and can take in multiple arguments, depending on the specific function:
%<function>(<argument1>, <argument2>, ...)
Function |
Operates On |
Description |
---|---|---|
|
Nodes |
Finds all the graph nodes that have ancestor connections starting from the node specified in The The Examples:
|
|
Nodes |
Finds the graph nodes at all subnet levels that match the callback name Wildcards can be specified in |
|
Nodes |
Finds all the graph nodes that have descendant connections starting from the node specified in The The Examples:
|
|
Nodes, ports |
Finds all the nodes/ports that have connections. |
|
Nodes, ports |
Finds all the nodes/ports that are promoted as an input or output (connected to the graph |
|
Nodes |
Node properties are stored in the The value of the property can be provided as an optional second argument. |
|
Nodes |
Finds the nodes on all subnet levels that contain the tag Wildcards can be specified in There can be multiple entries within |
|
Ports |
Finds all the ports that have the value type Wildcards can be specified in |