USD CameraAlgo : Fix reading and writing of cameras without shutter values #1472
+38
−13
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.
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 noshutter:open
andshutter:close
attributes would result in a shutter parameter of0, 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...