Blender V5.0
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
16struct Depsgraph;
17struct Image;
18struct ImageUser;
19struct Scene;
20
21namespace blender::io::usd {
22
23pxr::UsdStageRefPtr export_to_stage(const USDExportParams &params,
24 Depsgraph *depsgraph,
25 const char *filepath);
26
27std::string image_cache_file_path();
28std::string get_image_cache_file(const std::string &file_name, bool mkdir = true);
29std::string cache_image_color(const float color[4]);
30
33 /* Image and its transform. */
34 Image *image = nullptr;
35 ImageUser *iuser = nullptr;
36 pxr::GfMatrix4d transform = pxr::GfMatrix4d(1.0);
37
38 /* Multiply image by color. */
39 bool mult_found = false;
40 float color_mult[4]{};
41
42 /* Fixed color. */
43 bool color_found = false;
44 float intensity = 0.0f;
45 float color[4]{};
46};
47
48void world_material_to_dome_light(const Scene *scene, WorldToDomeLight &res);
49
50}; // namespace blender::io::usd
BPy_StructRNA * depsgraph
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
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)