-
Notifications
You must be signed in to change notification settings - Fork 202
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
MAYA-133671 - Add textured mode handling to topo grapher #4031
MAYA-133671 - Add textured mode handling to topo grapher #4031
Conversation
Allows quickly reducing a graph to only a surface for when the viewport is in "untextured" mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just one minor comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one suggestion you can take or leave.
computeGraph(material, textured); | ||
} | ||
|
||
void TopoNeutralGraph::computeGraph(const mx::ElementPtr& material, bool textured) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment. Alice had recommended that I move away from having boolean parameters like this in favour of multiple methods. So in this case something like computeGraph and computeTexturedGraph. Just a suggestion though, up to you. I do think its a bit nicer that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I guess the downside of that is you'd need an if statement on the textured parameter to call either computeGraph or computeTexturedGraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then the code of both functions end up identical except for three lines of code. I know of other C++ gurus that have a strict policy of using fully specified enums in this case. Especially useful when you start having calls like:
doSomething(true, false, true, true, false, false, false);
Sadly not something I can rework in the mayaUsdApi library as it needs to stay binary compatible. I can add constructors, but that is about it.
fe07c89
@seando-adsk ready for merge. Remaining preflight error is a known random failure of the testUsdExportPackage unit test. |
Allows quickly reducing a graph to only a surface for when the viewport is in "untextured" mode.