Skip to content

Commit

Permalink
Merge pull request #699 from isaranimation/fix/unused-but-set-variabl…
Browse files Browse the repository at this point in the history
…e-maya2018

fixed unused-but-set-variable on compiling with Maya 2018 earlier than 2018.7
  • Loading branch information
Krystian Ligenza authored Aug 7, 2020
2 parents 21a1745 + ee635af commit 99f14fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mayaUsd/render/vp2RenderDelegate/material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,6 @@ HdVP2Material::_CreateShaderInstance(const HdMaterialNetwork& mat) {

MHWRender::MShaderInstance* shaderInstance = nullptr;

const auto rend = mat.nodes.rend();

// MShaderInstance supports multiple connections between shaders on Maya 2018.7, 2019.3, 2020
// and above.
#if (MAYA_API_VERSION >= 20190300) || ((MAYA_API_VERSION >= 20180700) && (MAYA_API_VERSION < 20190000))
Expand All @@ -663,6 +661,7 @@ HdVP2Material::_CreateShaderInstance(const HdMaterialNetwork& mat) {
// and relationships in topological order to avoid forward-references, thus
// we can run a reverse iteration to avoid connecting a fragment before any
// of its downstream fragments.
const auto rend = mat.nodes.rend();
for (auto rit = mat.nodes.rbegin(); rit != rend; rit++) {
const HdMaterialNode& node = *rit;

Expand Down Expand Up @@ -742,6 +741,7 @@ HdVP2Material::_CreateShaderInstance(const HdMaterialNetwork& mat) {
// and relationships in topological order to avoid forward-references, thus
// we can run a reverse iteration to avoid connecting a fragment before any
// of its downstream fragments.
const auto rend = mat.nodes.rend();
for (auto rit = mat.nodes.rbegin(); rit != rend; rit++) {
const HdMaterialNode& node = *rit;

Expand Down

0 comments on commit 99f14fe

Please sign in to comment.