Repository navigation
Bind remaining OslRenderer and OSL GenOptions settings in Python - #3123
Merged
jstone-lucasfilm merged 1 commit intoOct 28, 2026
Conversation
Add Python bindings for OslRenderer.setEnvShaderParameterOverrides, setDataLibraryOSOPath, useOslCommandString, setAaLit, setAaUnlit and setOSLCmdStr, and for GenOptions.oslConnectCiWrapper. These are the settings MaterialXTest's OSL render tests use, so Python drivers of OslRenderer can reproduce its renders.
jstone-lucasfilm
approved these changes
Oct 28, 2026
jstone-lucasfilm
left a comment
Member
There was a problem hiding this comment.
This looks good to me, thanks @ppenenko!
jstone-lucasfilm
merged commit Oct 28, 2026
cf655dd
into
AcademySoftwareFoundation:main
41 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Exposes the remaining
OslRenderersetters andGenOptions.oslConnectCiWrapperto Python, so Python can configure OSL rendering the same way MaterialXTest's[renderosl]tests do in C++.New bindings:
OslRenderer:setEnvShaderParameterOverrides,setDataLibraryOSOPath,useOslCommandString,setOSLCmdStr,setAaLit,setAaUnlitGenOptions:oslConnectCiWrapperThese are plain one-to-one bindings, with no changes to the C++ API.
Testing
There are no Python tests for the renderer bindings in this repository yet. I use these bindings in a pytest-based render test harness in metashade/MaterialX - see PR metashade#86. It configures
OslRendererfrom Python with MaterialXTest's settings (-aalevels, theenvmap_filenameenvironment shader override,oslConnectCiWrapper) and renders the TestSuite materials with testrender. The resulting 143 images are pixel-identical to the ones MaterialXTest writes.Related: #3120 (unquoted paths in
OslRenderercommand lines).