-
Notifications
You must be signed in to change notification settings - Fork 207
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
USDShader fixes/improvements #6076
base: 1.4_maintenance
Are you sure you want to change the base?
Conversation
… to be enum indexes instead of string values.
…i:light:` prefix.
1fb3477
to
c2ca269
Compare
if allowedTokens and isinstance( plug, Gaffer.IntPlug ) : | ||
return IECore.IntVectorData( [ i for i in range( len( allowedTokens ) ) ] ) | ||
else : | ||
return IECore.StringVectorData( allowedTokens ) if allowedTokens else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you give me an example of a shader where this is necessary? I want to refresh my memory and check that this isn't a symptom of a problem elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one I didn't hit in my testing of MaterialX nodes but the check after it is the one which works for me, so this one might be redundant - the IntPlug check should keep it harmless to leave in though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, but what shader can I use to see the problem? I want to check that the problem isn't in the way we're loading the shader rather than in the UI...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was checking with gltf_surface
with the alpha mode plug but there were other shaders I was coming across that needed it, I'll get back to you on a few more tomorrow. I did see from the mtlx schema that they register as integer and not token so I think the loading part was correct (I think token/string is a better approach if that enum list changes though).
Generally describe what this PR will do, and why it is needed
These are the small things I noticed when I added Material X nodes as USDShader nodes, the enumerator presets were a string list in the UI when they should be integer indexes.
ri:light:
prefix.I have a build with the Prman USD plugin compiled in, and these extra parameters are on USDLight nodes. This just puts a suffix on the end like the Arnold parameters on Lux lights.
Related issues
Dependencies
Breaking changes
Checklist