blender_test/tests
Michael Kowalski f359a39d11 Fix T100028: Convert USD camera properties to mm from USD units.
Authored by Sonny Campbell.

Currently when importing a USD file, some of the camera properties are
ignored, or the units are not converted correctly from USD world units.
On import we currently set the focal length, but not the camera sensor
size (horizontal and vertical aperture), so the camera field of view
is wrong. The sensor size information is in the USD file, but is ignored
for perspective cameras.

USD uses "tenth of a world unit" scale for some physical camera properties
like focal length and aperture.
https://graphics.pixar.com/usd/release/api/class_usd_geom_camera.html#UsdGeom_CameraUnits

I have added the UsdStage's metersPerUnit parameter to the ImportSettings
so the camera can do the required conversion on import. This will convert from
the USD file's world units to millimeters for Blender's camera settings.

Reviewed by: Sybren and makowalski.

Differential Revision: https://developer.blender.org/D16019
2023-01-30 17:22:26 -05:00
..
blender_as_python_module Tests: don't create byte-code cache when calling Python from SVN 2022-11-03 11:51:52 +11:00
gtests BLI: Refactor matrix types & functions to use templates 2023-01-06 17:03:32 +01:00
performance Tests: run geometry nodes benchmarks multiple times to reduce noise 2023-01-06 13:04:49 +01:00
python Fix T100028: Convert USD camera properties to mm from USD units. 2023-01-30 17:22:26 -05:00
CMakeLists.txt CMake: add WITH_LIBS_PRECOMPILED option (UNIX only) 2023-01-19 17:10:42 +11:00