Fix #116346: USD importer ignores camera near clipping plane

Seems the actual change somehow got swallowed in 7a9284107d / !112905
[the corresponding clamping comment is already there :)].

Now just add back.

Thx @Matt-M for the initial investigation.

Pull Request: https://projects.blender.org/blender/blender/pulls/116353
This commit is contained in:
Philipp Oeser
2023-12-19 19:00:11 +01:00
committed by Philipp Oeser
parent a95dd8438d
commit 55963c2811

View File

@@ -82,6 +82,7 @@ void USDCameraReader::read_object_data(Main *bmain, const double motionSampleTim
/* Call UncheckedGet() to silence compiler warnings.
* Clamp to 1e-6 matching range defined in RNA. */
bcam->clip_start = max_ff(1e-6f, clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[0]);
bcam->clip_end = clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[1];
bcam->dof.focus_distance = focalDistanceVal.Get<float>();