fixing material pipeline builder failure caused by relative texture references #17139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Discovered material type builder issue while testing material canvas transparency support with models and textures provided by user.
Created a material graph, with a textured 2D node that reference a texture in the same folder as the model and material graph. Material canvas generated a material type with a texture reference in the same folder. The material builder processed the abstract material type and created the final material type in the intermediate asset folder with the same relative texture reference. The texture does not exist in the intermediate asset folder and caused the builder to fail because it could not resolve the file.
This change forces the material type builder to convert the texture reference paths into alias paths before saving the final material type so that they can be properly resolved.
How was this PR tested?
Followed same steps as described above, creating a material graph with a texture node that referenced a texture in the same folder as itself and the generated material type.
Before the change material type failed to build in the AP.
After the change, material type successfully built in the AP and displayed the correct texture when loaded.