Introduced a WIP standalone binary tool, "LibsToOso", allowing us to codegen and compile MaterialX libraries, as part as the ongoing work towards a new shader generator, "MaterialXGenOslNodes" #1
+375
−2
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.
It will build a new executable,
MaterialXGenOslNodes_LibsToOso
, inside thebin
install directory in your install location.Both the naming of the tool and its install location are likely going to change, obviously.
It can be used like so:
MaterialXGenOslNodes_LibsToOso --outputPath /path/to/my/output/dir --oslCompilerPath /path/to/my/oslc --oslIncludePath /path/to/my/osl/include
This alone will codegen and compile all the MaterialX
NodeDef
with a valid OSL implementation found in all the libraries in the provided output directory.The
--outputPath
,--oslCompilerPath
and--oslIncludePath
arguments are all mandatory for the tool to work, and they will be checked for both presence and validity (to a degree).It is also possible to specify a couple of optional arguments, such as:
--libraries
, that allows to specify the comma separated MaterialX libraries we want to process instead of everything, such asstdlib,pbrlib
.--prefix
, that allows adding a prefix to both the filename of a shader, as well as the shader function itself in OSL.