Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/hydra/material.cpp')
-rw-r--r--intern/cycles/hydra/material.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/intern/cycles/hydra/material.cpp b/intern/cycles/hydra/material.cpp
index b296d9f3751..a20f6578270 100644
--- a/intern/cycles/hydra/material.cpp
+++ b/intern/cycles/hydra/material.cpp
@@ -266,7 +266,7 @@ void HdCyclesMaterial::UpdateParameters(NodeDesc &nodeDesc,
const std::map<TfToken, VtValue> &parameters,
const SdfPath &nodePath)
{
- for (const std::pair<TfToken, VtValue> &param : parameters) {
+ for (const auto &param : parameters) {
VtValue value = param.second;
// See if the parameter name is in USDPreviewSurface terms, and needs to be converted
@@ -313,7 +313,7 @@ void HdCyclesMaterial::UpdateParameters(const HdMaterialNetwork &network)
void HdCyclesMaterial::UpdateParameters(const HdMaterialNetwork2 &network)
{
- for (const std::pair<SdfPath, HdMaterialNode2> &nodeEntry : network.nodes) {
+ for (const auto &nodeEntry : network.nodes) {
const SdfPath &nodePath = nodeEntry.first;
const auto nodeIt = _nodes.find(nodePath);
@@ -331,8 +331,7 @@ void HdCyclesMaterial::UpdateConnections(NodeDesc &nodeDesc,
const SdfPath &nodePath,
ShaderGraph *shaderGraph)
{
- for (const std::pair<TfToken, std::vector<HdMaterialConnection2>> &connection :
- matNode.inputConnections) {
+ for (const auto &connection : matNode.inputConnections) {
const TfToken &dstSocketName = connection.first;
const UsdToCyclesMapping *inputMapping = nodeDesc.mapping;
@@ -418,7 +417,7 @@ void HdCyclesMaterial::PopulateShaderGraph(const HdMaterialNetwork2 &networkMap)
auto graph = new ShaderGraph();
// Iterate all the nodes first and build a complete but unconnected graph with parameters set
- for (const std::pair<SdfPath, HdMaterialNode2> &nodeEntry : networkMap.nodes) {
+ for (const auto &nodeEntry : networkMap.nodes) {
NodeDesc nodeDesc = {};
const SdfPath &nodePath = nodeEntry.first;
@@ -465,7 +464,7 @@ void HdCyclesMaterial::PopulateShaderGraph(const HdMaterialNetwork2 &networkMap)
// Now that all nodes have been constructed, iterate the network again and build up any
// connections between nodes
- for (const std::pair<SdfPath, HdMaterialNode2> &nodeEntry : networkMap.nodes) {
+ for (const auto &nodeEntry : networkMap.nodes) {
const SdfPath &nodePath = nodeEntry.first;
const auto nodeIt = _nodes.find(nodePath);
@@ -478,7 +477,7 @@ void HdCyclesMaterial::PopulateShaderGraph(const HdMaterialNetwork2 &networkMap)
}
// Finally connect the terminals to the graph output (Surface, Volume, Displacement)
- for (const std::pair<TfToken, HdMaterialConnection2> &terminalEntry : networkMap.terminals) {
+ for (const auto &terminalEntry : networkMap.terminals) {
const TfToken &terminalName = terminalEntry.first;
const HdMaterialConnection2 &connection = terminalEntry.second;