Skip to content

Commit

Permalink
Help the compiler to fix Posix build break
Browse files Browse the repository at this point in the history
  • Loading branch information
JGamache-autodesk committed Jun 19, 2023
1 parent 6534c20 commit 0ab4c35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/mayaUsd/render/MaterialXGenOgsXml/GlslOcioNodeImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <MaterialXGenShader/Shader.h>
#include <MaterialXGenShader/ShaderStage.h>

#include <cstring>
#include <map>

MATERIALX_NAMESPACE_BEGIN
Expand Down
9 changes: 5 additions & 4 deletions lib/mayaUsd/render/vp2RenderDelegate/material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2663,11 +2663,12 @@ TfToken _RequiresColorManagement(
for (auto&& csAttrName : _knownColorSpaceAttrs) {
auto paramIt = n.parameters.find(csAttrName);
if (paramIt != n.parameters.end()) {
if (paramIt->second.IsHolding<TfToken>()) {
sourceColorSpace = paramIt->second.UncheckedGet<TfToken>().GetString();
const VtValue& val = paramIt->second;
if (val.IsHolding<TfToken>()) {
sourceColorSpace = val.UncheckedGet<TfToken>().GetString();
return;
} else if (paramIt->second.IsHolding<std::string>()) {
sourceColorSpace = paramIt->second.UncheckedGet<std::string>();
} else if (val.IsHolding<std::string>()) {
sourceColorSpace = val.UncheckedGet<std::string>();
return;
}
}
Expand Down

0 comments on commit 0ab4c35

Please sign in to comment.