Blender V5.3
usd_reader_domelight.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
6#include "usd.hh"
7#include "usd_reader_prim.hh"
8
9#include <pxr/usd/usdLux/domeLight.h>
10#include <pxr/usd/usdLux/domeLight_1.h>
11
12namespace blender {
13
14struct Main;
15struct Scene;
16
17namespace io::usd {
18
20
21 public:
22 USDDomeLightReader(const pxr::UsdPrim &prim,
23 const USDImportParams &import_params,
24 const ImportSettings &settings)
25 : USDPrimReader(prim, import_params, settings)
26 {
27 }
28
29 bool valid() const override
30 {
31 return prim_.IsA<pxr::UsdLuxDomeLight>() || prim_.IsA<pxr::UsdLuxDomeLight_1>();
32 }
33
34 /* Until Blender supports DomeLight objects natively, use a separate create_object overload that
35 * allows the caller to pass in the required Scene data. */
36
37 void create_object(Main * /*bmain*/) override {};
38 void create_object(Scene *scene, Main *bmain);
39};
40
41} // namespace io::usd
42} // namespace blender
USDDomeLightReader(const pxr::UsdPrim &prim, const USDImportParams &import_params, const ImportSettings &settings)
USDPrimReader(const pxr::UsdPrim &prim, const USDImportParams &import_params, const ImportSettings &settings)
const pxr::UsdPrim & prim() const
BMesh Iterators.