Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

shadingNetworkCompare [-byName boolean] [-byValue boolean] [-delete] [-equivalent] [-network1] [-network2] [-upstreamOnly boolean]

shadingNetworkCompare is NOT undoable, queryable, and NOT editable.

This command allows you to compare two shading networks.

Return value

string[]|string|int

In query mode, return type is based on queried flag.

Keywords

shader, shading, network

Flags

byName, byValue, delete, equivalent, network1, network2, upstreamOnly
Long name (short name) Argument types Properties
-byName(-nam) boolean create
Indicates whether the comparison should consider node names. If true, two shading networks will be considered equivalent only if the names of corresponding nodes are the same, ignoring namespaces. If false, two shading networks will be considered equivalent even if corresponding nodes are named differently. Default is 'false'.
-byValue(-val) boolean create
Indicates whether the comparison should consider the values of unconnected attributes. If true, two shading networks will be considered equivalent only if corresponding, unconnected attributes are the same type and have the same value. Only attributes of type 'int', 'bool', 'float', and 'string' will have their values compared. If false, two shading networks will be considered equivalent even if corresponding, unconnected attributes have different values or are different types. Default is 'true'.
-upstreamOnly(-up) boolean create
Indicates whether the comparison should consider nodes which are connected downstream from shading network nodes. If true, only those nodes which are upstream from the shading group will be considered. If, following only downstream connections, there is no connection path from a node to one of the shader attributes on the shading group, the node will not be considered. If false, a node will be considered if a connection path can found, following either upstream or downstream connections, which terminates with an input connection to one of the shading groups shader attributes. These dangling nodes do not directly contribute to the color, displacement, or volume characteristics of the shading group. Default is 'false'.
-equivalent(-eq) query
Returns an int. 1 if the shading networks in the specified comparison are equivalent. 0 otherwise.
-network1(-n1) query
Returns a string[]. Returns an empty string array if the shading networks in the specified comparison are not equivalent. Otherwise returns the nodes in the first shading network.
-network2(-n2) query
Returns a string[]. Returns an empty string array if the shading networks in the specified comparison are not equivalent. Otherwise returns the nodes in the second shading network.
-delete(-del) create
Deletes the specified comparison from memory.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

shadingNetworkCompare blinn1SG blinn2SG;
// Result: shadingNetworkComparison1
shadingNetworkCompare -q -equivalent shadingNetworkComparison1;
// Result: 1
shadingNetworkCompare -q -network1 shadingNetworkComparison1;
// Result: blinn1SG blinn1
shadingNetworkCompare -delete shadingNetworkComparison1;