Commit 0df5d8220b made a change to have the `USDStageReader` only keep
a reference to the ImportSettings struct. This isn't safe to do because
there's scenarios where the ImportSettings might be defined as a stack
variable but the reader outlives the lifetime of that variable. This
happens inside `USD_create_handle` where the reader is returned to the
caller for instance.
Fix this, and the original issue which lead to the change causing the
regression, by having `USDStageReader` own ImportSettings directly so
it's more obvious that it is A) tied to the lifetime of the reader and
B) can no longer become out of sync with a caller's own ImportSettings
data (since that no longer exists).
Pull Request: https://projects.blender.org/blender/blender/pulls/132095
A variety of non-functional style changes for the recently added
DomeLight code:
- Remove unused includes and forward decls
- Changed NULL -> nullptr
- Use `motionSampleTime` name consistently
- Moved the `r_value` out parameter to the last position per our coding
guidelines
Pull Request: https://projects.blender.org/blender/blender/pulls/122641
This commit adds logic to convert between USD dome lights and Blender
world materials.
The USD dome light rotation is represented in a mapping node input to the
environment texture. If the dome light has a color specified in addition to
the texture map, the color will be converted to a vector multiply on the
the environment texture output.
I the imported USD has multiple dome lights, only the first dome light will
be converted to a world material.
Co-authored-by: kiki <charles@skeletalstudios.com>
Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/121800