Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/io/usd/intern/usd_reader_stage.cc')
-rw-r--r--source/blender/io/usd/intern/usd_reader_stage.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_stage.cc b/source/blender/io/usd/intern/usd_reader_stage.cc
index 06f7d3ce3f5..583c58a1356 100644
--- a/source/blender/io/usd/intern/usd_reader_stage.cc
+++ b/source/blender/io/usd/intern/usd_reader_stage.cc
@@ -18,7 +18,13 @@
#include <pxr/usd/usdGeom/nurbsCurves.h>
#include <pxr/usd/usdGeom/scope.h>
#include <pxr/usd/usdGeom/xform.h>
-#include <pxr/usd/usdLux/light.h>
+
+#if PXR_VERSION >= 2111
+# include <pxr/usd/usdLux/boundableLightBase.h>
+# include <pxr/usd/usdLux/nonboundableLightBase.h>
+#else
+# include <pxr/usd/usdLux/light.h>
+#endif
#include <iostream>
@@ -55,7 +61,12 @@ USDPrimReader *USDStageReader::create_reader_if_allowed(const pxr::UsdPrim &prim
if (params_.import_meshes && prim.IsA<pxr::UsdGeomMesh>()) {
return new USDMeshReader(prim, params_, settings_);
}
+#if PXR_VERSION >= 2111
+ if (params_.import_lights && (prim.IsA<pxr::UsdLuxBoundableLightBase>() ||
+ prim.IsA<pxr::UsdLuxNonboundableLightBase>())) {
+#else
if (params_.import_lights && prim.IsA<pxr::UsdLuxLight>()) {
+#endif
return new USDLightReader(prim, params_, settings_);
}
if (params_.import_volumes && prim.IsA<pxr::UsdVolVolume>()) {
@@ -82,7 +93,11 @@ USDPrimReader *USDStageReader::create_reader(const pxr::UsdPrim &prim)
if (prim.IsA<pxr::UsdGeomMesh>()) {
return new USDMeshReader(prim, params_, settings_);
}
+#if PXR_VERSION >= 2111
+ if (prim.IsA<pxr::UsdLuxBoundableLightBase>() || prim.IsA<pxr::UsdLuxNonboundableLightBase>()) {
+#else
if (prim.IsA<pxr::UsdLuxLight>()) {
+#endif
return new USDLightReader(prim, params_, settings_);
}
if (prim.IsA<pxr::UsdVolVolume>()) {