blender_test/tests/python
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
..
collada Cleanup: use lowercase function calls & macros in for CMake 2022-09-23 14:33:44 +10:00
modules Tests: Print when mesh test starts, to help debugging crashes 2022-12-20 12:02:05 -06:00
view_layer Cleanup: use lowercase function calls & macros in for CMake 2022-09-23 14:33:44 +10:00
alembic_export_tests.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
batch_import.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bevel_operator.py Cleanup: run autopep8 on tests/ 2022-04-19 15:25:55 +10:00
bl_alembic_io_test.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bl_animation_fcurves.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bl_blendfile_io.py Cleanup: format 2022-12-29 20:49:08 +13:00
bl_blendfile_liblink.py Cleanup: format 2022-12-05 12:54:00 +11:00
bl_blendfile_library_overrides.py Cleanup: remove redundant braces from assert & raise 2022-09-14 16:18:59 +10:00
bl_blendfile_utils.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_bundled_modules.py Tests: test availability of new bundled Python libraries 2023-01-09 13:42:56 +01:00
bl_constraints.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_id_management.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_io_curve_svg_test.py SVG: Add more sophisticated test suit 2022-11-10 11:04:30 +01:00
bl_keymap_completeness.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bl_keymap_validate.py Cleanup: remove redundant braces from assert & raise 2022-09-14 16:18:59 +10:00
bl_load_addons.py Cleanup: correct API usage for script access 2022-09-29 17:22:32 +10:00
bl_load_py_modules.py Cleanup: correct API usage for script access 2022-09-29 17:22:32 +10:00
bl_mesh_modifiers.py Cleanup: remove redundant braces from assert & raise 2022-09-14 16:18:59 +10:00
bl_mesh_validate.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bl_pyapi_bpy_driver_secure_eval.py Tests: add test to ensure restricted py-driver execution is working 2022-07-12 16:11:19 +10:00
bl_pyapi_bpy_path.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_pyapi_bpy_utils_units.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_pyapi_idprop_datablock.py Cleanup: replace StringIO seek() & read() with a call to getvalue() 2022-12-18 14:18:01 +11:00
bl_pyapi_idprop.py Cleanup: add trailing commas for multi-line collections 2022-12-15 17:34:09 +11:00
bl_pyapi_mathutils.py Tests: enable element-wise multiplication for mathutils API tests 2022-11-20 10:42:17 +11:00
bl_pyapi_prop_array.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_pyapi_text.py Update tests to account for Text.as_string not adding a trailing newline 2022-05-17 18:11:16 +10:00
bl_rigging_symmetrize.py Cleanup: fix various typos 2022-06-28 15:56:16 +02:00
bl_rna_defaults.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
bl_rna_manual_reference.py Cleanup: remove redundant braces from assert & raise 2022-09-14 16:18:59 +10:00
bl_rst_completeness.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bl_run_operators_event_simulate.py Cleanup: remove redundant braces from assert & raise 2022-09-14 16:18:59 +10:00
bl_run_operators.py Sculpt: New Cavity Automasking Mode 2022-09-28 16:22:34 -07:00
bl_test.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
bl_usd_import_test.py Fix T100028: Convert USD camera properties to mm from USD units. 2023-01-30 17:22:26 -05:00
boolean_operator.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
CMakeLists.txt Geometry Nodes: new Interpolate Curves node 2023-01-20 12:09:38 +01:00
compositor_render_tests.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
curve_to_mesh.py Cleanup: run autopep8 on tests/ 2022-04-19 15:25:55 +10:00
cycles_render_tests.py Cycles: Enable MNEE on Metal (macOS >= 13) 2022-10-12 17:06:50 +01:00
deform_modifiers.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
eevee_render_tests.py Cleanup: format 2022-08-04 07:41:03 +10:00
ffmpeg_tests.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
geo_node_test.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
gpu_info.py License headers: add missing license headers 2022-08-09 13:25:11 +10:00
modifiers.py Cleanup: format 2022-12-29 20:49:08 +13:00
opengl_draw_tests.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
operators.py Add regression test for triangulate faces 2022-11-16 18:34:11 +01:00
pep8.py Fixes for 'make check_pep8' target 2023-01-18 18:27:49 +11:00
physics_cloth.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
physics_dynamic_paint.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
physics_ocean.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
physics_particle_instance.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
physics_particle_system.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
physics_softbody.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
rna_array.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
rna_info_dump.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
rst_to_doctree_mini.py Cleanup: remove "<pep8 compliant>" from headers 2022-06-02 20:16:20 +10:00
sequencer_render_tests.py File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
workbench_render_tests.py Workbench: Increase render tests fail threshold for hair. 2022-06-24 14:09:15 +02:00