[Bf-blender-cvs] [9bed12b3a42] usd-importer-T81257-merge: USD Import: fixed compiler warning.
makowalski
noreply at git.blender.org
Tue Mar 9 04:07:52 CET 2021
Commit: 9bed12b3a42e3e7d066e0333952ca60ff3b5ab07
Author: makowalski
Date: Mon Mar 8 20:19:15 2021 -0500
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB9bed12b3a42e3e7d066e0333952ca60ff3b5ab07
USD Import: fixed compiler warning.
===================================================================
M source/blender/io/usd/intern/usd_reader_light.cc
===================================================================
diff --git a/source/blender/io/usd/intern/usd_reader_light.cc b/source/blender/io/usd/intern/usd_reader_light.cc
index 1d947416242..f0665d170a4 100644
--- a/source/blender/io/usd/intern/usd_reader_light.cc
+++ b/source/blender/io/usd/intern/usd_reader_light.cc
@@ -99,6 +99,7 @@ void USDLightReader::readObjectData(Main *bmain, double motionSampleTime)
pxr::VtValue intensity;
light_prim.GetIntensityAttr().Get(&intensity, motionSampleTime);
+
blight->energy = intensity.Get<float>();
// TODO: Not currently supported
@@ -115,7 +116,8 @@ void USDLightReader::readObjectData(Main *bmain, double motionSampleTime)
pxr::VtValue color;
light_prim.GetColorAttr().Get(&color, motionSampleTime);
- pxr::GfVec3f color_vec = color.Get<pxr::GfVec3f>();
+ // Calling UncheckedGet() to silence compiler warning.
+ pxr::GfVec3f color_vec = color.UncheckedGet<pxr::GfVec3f>();
blight->r = color_vec[0];
blight->g = color_vec[1];
blight->b = color_vec[2];
@@ -195,4 +197,4 @@ void USDLightReader::readObjectData(Main *bmain, double motionSampleTime)
}
USDXformReader::readObjectData(bmain, motionSampleTime);
-}
\ No newline at end of file
+}
More information about the Bf-blender-cvs
mailing list