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

LOOKDEVX-2354 - Fix the transform nodes crash #3552

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

JGamache-autodesk
Copy link
Collaborator

A transform node with empty space values will cause the shadergen to crash. This has been fixed in future MaterialX 1.38.9 by introducing ShaderPort::getValueString() in AcademySoftwareFoundation/MaterialX#1560

We have backported that fix in local copies of the transform node C++ implementations in order to prevent crashing with the current versions of MaterialX.

A transform node with empty space values will cause the shadergen to
crash. This has been fixed in future MaterialX 1.38.9 by introducing
ShaderPort::getValueString() in AcademySoftwareFoundation/MaterialX#1560

We have backported that fix in local copies of the transform node
C++ implementations in order to prevent crashing with the current
versions of MaterialX.
@JGamache-autodesk JGamache-autodesk self-assigned this Jan 12, 2024
@JGamache-autodesk JGamache-autodesk added the vp2renderdelegate Related to VP2RenderDelegate label Jan 12, 2024

string MayaTransformVectorNodeGlsl::getPortValueString(const ShaderInput* input) const
{
if (!input || !input->getValue()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is where the crash gets fixed. The previous code was not checking for !input->getValue().

Copy link
Collaborator

@vlasovi vlasovi left a comment

Choose a reason for hiding this comment

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

Looks good

@JGamache-autodesk JGamache-autodesk added the ready-for-merge Development process is finished, PR is ready for merge label Jan 12, 2024
@JGamache-autodesk
Copy link
Collaborator Author

@seando-adsk Ready for merge.

@seando-adsk seando-adsk merged commit ce0a3bb into dev Jan 15, 2024
11 checks passed
@seando-adsk seando-adsk deleted the gamaj/LOOKDEVX-2354/fix_crash_with_transform_nodes branch January 15, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants