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

MDL : Support file syntax which precludes usage of ".." for relative paths #1106

Open
bernardkwok opened this issue Feb 3, 2021 · 0 comments
Assignees

Comments

@bernardkwok
Copy link

This currently shows up for the "Example" materials which use "../../../Images/" syntax for image references.
Absolute file paths cannot be used (tried) and relative pathing does not appear to work even with the correct root search path.
There are examples of the current errors:

D:\Work\materialx\MaterialX-adsk-public-master\build_public_rel\source\MaterialXTest\resources\Materials\Examples\StandardSurface\standard_surface_brass_tiled\SR_brass1.genmdl.mdl(229,61): Error C292: strict relative file path contains too many directory names '..' D:\Work\materialx\MaterialX-adsk-public-master\build_public_rel\source\MaterialXTest\resources\Materials\Examples\StandardSurface\standard_surface_brass_tiled\SR_brass1.genmdl.mdl(229,61): Error C298: Unable to resolve file path '../../../Images/brass_color.jpg' D:\Work\materialx\MaterialX-adsk-public-master\build_public_rel\source\MaterialXTest\resources\Materials\Examples\StandardSurface\standard_surface_brass_tiled\SR_brass1.genmdl.mdl(230,64): Error C292: strict relative file path contains too many directory names '..' D:\Work\materialx\MaterialX-adsk-public-master\build_public_rel\source\MaterialXTest\resources\Materials\Examples\StandardSurface\standard_surface_brass_tiled\SR_brass1.genmdl.mdl(230,64): Error C298: Unable to resolve file path '../../../Images/brass_roughness.jpg'

It seems like the only way to address this is to find the path referenced via "../../../" and add that to the search path.
TBD if there is a better way to handle this.

Note that other files which use relative path such as "resource/Images/" do currently work so it's purely a binding issue and not related to shader generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant