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

[HdMtlx] Fix duplicate name error when processing HdNetwork from Houdini #1659

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

hshakula
Copy link
Contributor

Description of Change(s)

Resolve duplicate names by appending a suffix to nodegraph that encapsulates HdNetwork nodes.
The reason why there are duplicates is that this name and this one are the same. It leads to attempting to create nodegraph with the same name as the already created material node.

Fixes Issue(s)

#1658

@jilliene
Copy link

Filed as internal issue #USD-6973

@@ -277,7 +277,7 @@ _GatherUpstreamNodes(

// Initilize the mxNodeGraph if needed
if (!(*mxNodeGraph)) {
const std::string & nodeGraphName = hdNodePath.GetParentPath().GetName();
std::string nodeGraphName = hdNodePath.GetParentPath().GetName() + "_Graph";
Copy link

@bernardkwok bernardkwok Nov 2, 2021

Choose a reason for hiding this comment

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

As a suggestion here, there is a makeUniqueChildName() method which can be called on mxDoc, and should be more robust than appending "_Graph" -- in case this is also a duplicate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like you mean createValidChildName. Yeah we can use it here

pixar-oss pushed a commit that referenced this pull request Dec 18, 2021
…eValidChildName function to better ensure unique nodeGraph names.

Suggestion from @bernardkwok on GitHub PR #1659

Fixes #1659

(Internal change: 2205741)
@pixar-oss pixar-oss merged commit 30d8a0d into PixarAnimationStudios:dev Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants