Blender V5.3
usd_scene_index.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/imaging/hd/sceneIndex.h>
11#include <pxr/usd/usd/stage.h>
12#include <pxr/usdImaging/usdImaging/stageSceneIndex.h>
13
14namespace blender {
15
16struct Depsgraph;
17
18namespace io::hydra {
19
20/* Populate Hydra render index using USD file export, for testing. */
22 private:
23 pxr::HdRenderIndex *render_index_;
24 pxr::SdfPath const delegate_id_;
25 pxr::UsdStageRefPtr stage_;
26 pxr::UsdImagingStageSceneIndexRefPtr stage_scene_index_;
27 pxr::HdSceneIndexBaseRefPtr final_scene_index_;
28
29 std::string temp_dir_;
30 std::string temp_file_;
31
32 bool use_materialx = true;
33
34 public:
35 USDSceneIndex(pxr::HdRenderIndex *render_index,
36 pxr::SdfPath const &delegate_id,
37 bool use_materialx);
39
40 void populate(Depsgraph *depsgraph);
41};
42
43} // namespace io::hydra
44} // namespace blender
USDSceneIndex(pxr::HdRenderIndex *render_index, pxr::SdfPath const &delegate_id, bool use_materialx)
void populate(Depsgraph *depsgraph)
BMesh Iterators.