Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MaterialX code generation #1696

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mayaUsd/render/vp2RenderDelegate/material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ bool _IsTopologicalNode(const HdMaterialNode2& inNode)
mx::NodeDefPtr nodeDef
= _GetMaterialXData()._mtlxLibrary->getNodeDef(inNode.nodeTypeId.GetString());
if (nodeDef) {
return _mtlxTopoNodeSet.find(nodeDef->getCategory()) != _mtlxTopoNodeSet.cend();
return _mtlxTopoNodeSet.find(nodeDef->getNodeString()) != _mtlxTopoNodeSet.cend();
}
return false;
}
Expand Down
14 changes: 1 addition & 13 deletions lib/mayaUsd/ufe/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@

PXR_NAMESPACE_USING_DIRECTIVE

#ifndef MAYA_MSTRINGARRAY_ITERATOR_CATEGORY
// MStringArray::Iterator is not standard-compliant in Maya 2019, needs the
// following workaround. Fixed in Maya 2020. PPT, 20-Jun-2019.
namespace std {
template <> struct iterator_traits<MStringArray::Iterator>
{
typedef std::bidirectional_iterator_tag iterator_category;
};
} // namespace std
#endif

namespace {

constexpr auto kIllegalUSDPath = "Illegal USD run-time path %s.";
Expand Down Expand Up @@ -313,8 +302,7 @@ bool isAGatewayType(const std::string& mayaNodeType)
cmd.format("nodeType -inherited -isTypeName ^1s", mayaNodeType.c_str());
if (MS::kSuccess == MGlobal::executeCommand(cmd, inherited)) {
MString gatewayNodeType(ProxyShapeHandler::gatewayNodeType().c_str());
auto iter2 = std::find(inherited.begin(), inherited.end(), gatewayNodeType);
isInherited = (iter2 != inherited.end());
isInherited = inherited.indexOf(gatewayNodeType) != -1;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails with VS2019 because of missing type traits "value_type" and "reference".

g_GatewayType[mayaNodeType] = isInherited;
}
return isInherited;
Expand Down