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

Fixed bug with visibility determination #1479

Merged
merged 2 commits into from
Jun 12, 2021
Merged
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions lib/mayaUsd/utils/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,18 @@ bool UsdMayaUtil::isRenderable(const MObject& object)
}
}

MDagPath dagPath;
stat = mFn.getPath(dagPath);
CHECK_MSTATUS_AND_RETURN(stat, false);
if (!dagPath.isVisible()) {
return false;
}

const MDAGDrawOverrideInfo drawOverrideInfo = dagPath.getDrawOverrideInfo();
if (drawOverrideInfo.fOverrideEnabled && drawOverrideInfo.fDisplayType == MDAGDrawOverrideInfo::kDisplayTypeTemplate) {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Lgtm! So to be clear, previously this function didn't return the state correctly when the draw override's display type was set to "Template".

image


// this shape is renderable
return true;
}
Expand Down