Blender V4.3
usd_scene_delegate.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <string>
8
9#include <pxr/imaging/hd/renderIndex.h>
10#include <pxr/usdImaging/usdImaging/delegate.h>
11
12struct Depsgraph;
13
14namespace blender::io::hydra {
15
16/* Populate Hydra render index using USD file export, for testing. */
18 private:
19 pxr::HdRenderIndex *render_index_;
20 pxr::SdfPath const delegate_id_;
21 pxr::UsdStageRefPtr stage_;
22 std::unique_ptr<pxr::UsdImagingDelegate> delegate_;
23
24 std::string temp_dir_;
25 std::string temp_file_;
26
27 bool use_materialx = true;
28
29 public:
30 USDSceneDelegate(pxr::HdRenderIndex *render_index,
31 pxr::SdfPath const &delegate_id,
32 bool use_materialx);
34
35 void populate(Depsgraph *depsgraph);
36};
37
38} // namespace blender::io::hydra
USDSceneDelegate(pxr::HdRenderIndex *render_index, pxr::SdfPath const &delegate_id, bool use_materialx)
const Depsgraph * depsgraph