The shaderfx command enables you to query information about your ShaderFX graph such as the number of nodes in your graph, the list of properties in your node, as well as perform actions such as add or delete a node, create or break connections, as well as specify the DAG path of the ShaderFX shader that you are working on.
For details on the shaderfx command and a description of its flags, enter shaderfx – help in the MEL command line.
The shaderfx command can be used with both Shaderfx Shader graphs and Stingray PBS graphs. Specify either your Shaderfx Shader or Stingray PBS node using the -sfxnode flag. However, only flags that are applicable to Stingray PBS graphs can be used with the latter. For example, you can use the -getNodeCount flag but you cannot use the -addGroup flag.
For example:
shaderfx -sfxnode "StingrayPBS1" -getNodeCount