Skip to content

USD CameraAlgo : Fix reading and writing of cameras without shutter values #1472

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

Draft
wants to merge 2 commits into
base: RB-10.5
Choose a base branch
from

Conversation

murraystevenson
Copy link
Collaborator

This improves how we deal with the camera shutter when reading and writing cameras to USD. Previously we'd always read/write shutter values even if the shutter wasn't authored, which resulted in baking in either Cortex's default shutter value when writing a camera with no shutter to USD, or USD's default shutter value when reading a camera with no shutter from USD. This would make it hard to USD round-trip cameras without a shutter parameter, as they'd come back in with a baked-in -0.5, 0.5 shutter, and reading cameras authored in other DCCs with no shutter:open and shutter:close attributes would result in a shutter parameter of 0, 0 as noted by @masterkeech in Gaffer #6431.

While this is a fix and I've currently made this PR to RB-10.5, this is a change in behaviour and would be better held back for a major Gaffer release though we've yet to make a call on how to handle Cortex across the upcoming Gaffer 1.5/1.6 transition so I've marked this as draft while we figure that out...

This avoids baking in our default [-0.5, 0.5] shutter when writing a camera with no shutter to USD.
This avoids cameras read from USD files ending up with USD's default [0, 0] shutter when the USD camera has no shutter values.
@murraystevenson murraystevenson self-assigned this Jun 27, 2025
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.

1 participant