![]() |
|
Include dependency graph for shaderNodeQueryUtils.h:Go to the source code of this file.
Functions | |
| SDR_API VtDictionary | GroupQueryResults (const SdrShaderNodeQueryResult &result) |
| Return shader node query results in a nested tree form. | |
| SDR_API VtDictionary GroupQueryResults | ( | const SdrShaderNodeQueryResult & | result | ) |
Return shader node query results in a nested tree form.
For example, if a query result contains:
["context1", "id1"] ["context1", "id2"]The grouped result will be a VtDictionary of the form
where the SdrShaderNodeConstPtr container is a VtValue holding std::vector<SdrShaderNodeConstPtr> and is sorted alphabetically by node identifier, then sourceType.
Values are stringified by SdrShaderNodeQueryResult::GetStringifiedValues.
Note that this utility doesn't help collapse empty values, but will rather preserve empty values as keys. For example, a query result containing values from a single node might have values:
For this above example, this function would return
Note that innermost nodes are always contained in a list structure.
Returns an empty VtDictionary if the given query result has no keys or if the result has no nodes.