Blender V5.3
usd_private.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/* Functions shared between USD and Hydra, that are private to the USD module. */
6
7#pragma once
8
9#include <pxr/base/gf/matrix4d.h>
10#include <pxr/usd/usd/common.h>
11
12#include <string>
13
14#include "usd.hh"
15
16namespace blender {
17
18struct Depsgraph;
19struct Image;
20struct ImageUser;
21struct Scene;
22
23namespace io::usd {
24
25pxr::UsdStageRefPtr export_to_stage(const USDExportParams &params,
26 Depsgraph *depsgraph,
27 const char *filepath);
28
29std::string image_cache_file_path();
30std::string get_image_cache_file(const std::string &file_name, bool mkdir = true);
31std::string cache_image_color(const float color[4]);
32
35 /* Image and its transform. */
36 Image *image = nullptr;
37 ImageUser *iuser = nullptr;
38 pxr::GfMatrix4d transform = pxr::GfMatrix4d(1.0);
39
40 /* Multiply image by color. */
41 bool mult_found = false;
42 float color_mult[4]{};
43
44 /* Fixed color. */
45 bool color_found = false;
46 float intensity = 0.0f;
47 float color[4]{};
48};
49
51
52}; // namespace io::usd
53
54} // namespace blender
std::string image_cache_file_path()
void world_material_to_dome_light(const USDExportParams &params, const Scene *scene, pxr::UsdStageRefPtr stage)
std::string cache_image_color(const float color[4])
std::string get_image_cache_file(const std::string &file_name, bool mkdir)
pxr::UsdStageRefPtr export_to_stage(const USDExportParams &params, Depsgraph *depsgraph, const char *filepath)
BMesh Iterators.