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

Spot light usd lux lights #5416

Merged

Conversation

ericmehl
Copy link
Collaborator

@ericmehl ericmehl commented Aug 7, 2023

This adds support for USDLux lights to the light tool.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.

Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround on this Eric - I've made a couple of comments inline, but nothing major.

Changes.md Outdated Show resolved Hide resolved
Changes.md Outdated Show resolved Hide resolved
python/GafferSceneUITest/ParameterInspectorTest.py Outdated Show resolved Hide resolved
python/GafferSceneUITest/ParameterInspectorTest.py Outdated Show resolved Hide resolved
src/GafferSceneUI/ParameterInspector.cpp Outdated Show resolved Hide resolved
@ericmehl ericmehl force-pushed the spotLight-usdLuxLights branch 2 times, most recently from 34c094a to dd522a0 Compare August 8, 2023 16:44
@ericmehl
Copy link
Collaborator Author

ericmehl commented Aug 8, 2023

We should be good on CI now, it passed a minute ago but I noticed a mistake changes.md so I've pushed a fix for that. I've addressed the comments so as long as nothing weird happens to CI this should be ready for another look and hopefully a quick squash and merge.

Two things are needed to make `OptionalValuePlug`, used by USDLuxLights,
compatible with `ParameterInspector` and `LightTool` :

1. Recognize when the `source` is coming from an `OptionalValuePlug`
and only return it as the source when the plug is enabled.
2. Recognize when the parameter does not exist in the shader data and
don't return an `editFunction()` if so.

Previously we were not checking if a parameter existed for a shader, so
we would return an `editFunction` that when called, would raise an
exception when it would be called via `acquireEdit()`.
( `::parameterValue` in `EditScopeAlgo` raises the exception. )
@johnhaddon
Copy link
Member

ready for another look and hopefully a quick squash and merge.

Thanks Eric, LGTM. I've squashed and am about to merge.

@johnhaddon johnhaddon merged commit 35bb328 into GafferHQ:1.3_maintenance Aug 9, 2023
1 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants