[Bf-blender-cvs] [0746445c70a] usd-importer-T81257-merge: USD Import: fixed compiler warnings.

makowalski noreply at git.blender.org
Tue Mar 9 04:07:53 CET 2021


Commit: 0746445c70a950ead12004df2f07d5f8c3e7f338
Author: makowalski
Date:   Mon Mar 8 21:33:52 2021 -0500
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB0746445c70a950ead12004df2f07d5f8c3e7f338

USD Import: fixed compiler warnings.

===================================================================

M	source/blender/io/usd/intern/usd_reader_camera.cc

===================================================================

diff --git a/source/blender/io/usd/intern/usd_reader_camera.cc b/source/blender/io/usd/intern/usd_reader_camera.cc
index d76c2828d3a..e1af9df2b54 100644
--- a/source/blender/io/usd/intern/usd_reader_camera.cc
+++ b/source/blender/io/usd/intern/usd_reader_camera.cc
@@ -89,8 +89,9 @@ void USDCameraReader::readObjectData(Main *bmain, double motionSampleTime)
   bcam->type = (projectionVal.Get<pxr::TfToken>().GetString() == "perspective") ? CAM_PERSP :
                                                                                   CAM_ORTHO;
 
-  bcam->clip_start = max_ff(0.1f, clippingRangeVal.Get<pxr::GfVec2f>()[0]);
-  bcam->clip_end = clippingRangeVal.Get<pxr::GfVec2f>()[1];
+  // Calling UncheckedGet() to silence compiler warnings.
+  bcam->clip_start = max_ff(0.1f, clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[0]);
+  bcam->clip_end = clippingRangeVal.UncheckedGet<pxr::GfVec2f>()[1];
 
   bcam->dof.focus_distance = focalDistanceVal.Get<float>();
   bcam->dof.aperture_fstop = static_cast<float>(fstopVal.Get<float>());
@@ -100,4 +101,4 @@ void USDCameraReader::readObjectData(Main *bmain, double motionSampleTime)
   }
 
   USDXformReader::readObjectData(bmain, motionSampleTime);
-}
\ No newline at end of file
+}



More information about the Bf-blender-cvs mailing list