-
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-128594 - Imported displayOpacity are not interpreted correctly #3071
MAYA-128594 - Imported displayOpacity are not interpreted correctly #3071
Conversation
// data | ||
if (colorSetRep == MFnMesh::kRGB) { | ||
exportDisplayOpacity = true; | ||
} |
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.
Should there be a pre-pass to detect this? The code as written seems to depends on the order of the color set?
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.
Yes. If we can export DisplayOpacity separately actually depends on the type of DisplayColor. If the display color is in RGBA format (which means it contains alpha, aka opacity, already), then we can't export the DisplayOpacity. However if the color is in RGB format (no alpha data), we can safely export the opacity, and this should be the only scenario we export DisplayOpacity
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.
Yes, but as I understand the code, the flag exportDisplayOpacity is set to true within the same loop where it is checked. So the behaviour depends on the order the color set names are encountered in this loop, which seems to me to be arbitrary?
In short, if the flags gets sets after DisplayOpacityColorSetName has already been processed, then it won't use the opacity even though the flag is now true.
That is why I suggested that the flag be set in a separate loop that would run before, so that it is certain to be set to the correct value when the opacity color set is encountered.
I may be wrong, if so I'd like to know where my reasoning is incorrect.
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.
Oh I see. Let me look into that
…/MAYA-128594/display-opacity-export
bcb480e
No description provided.