Blender V5.3
usd_writer_material.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#pragma once
5
6#include "BLI_string_ref.hh"
7
8#include <pxr/usd/usdShade/material.h>
9
10#include <string>
11
12namespace blender {
13
14struct bNode;
15struct Image;
16struct Material;
17struct ReportList;
18
19namespace io::usd {
20
22struct USDExportParams;
23
30pxr::UsdShadeMaterial create_usd_material(const USDExporterContext &usd_export_context,
31 pxr::SdfPath usd_path,
32 const Material *material,
33 const std::string &active_uvmap_name,
34 ReportList *reports);
35
39void create_usd_viewport_material(const USDExporterContext &usd_export_context,
40 const Material *material,
41 const pxr::UsdShadeMaterial &usd_material);
42
47pxr::TfToken token_for_input(const StringRef input_name);
48
49void export_texture(bNode *node,
50 const pxr::UsdStageRefPtr stage,
51 const bool allow_overwrite = false,
52 ReportList *reports = nullptr);
53
54void export_texture(Image *ima,
55 const pxr::UsdStageRefPtr stage,
56 const bool allow_overwrite = false,
57 ReportList *reports = nullptr);
58
68std::string get_tex_image_asset_filepath(const bNode *node,
69 const pxr::UsdStageRefPtr stage,
70 const USDExportParams &export_params);
71
72std::string get_tex_image_asset_filepath(Image *ima,
73 const pxr::UsdStageRefPtr stage,
74 const USDExportParams &export_params);
81std::string get_tex_image_asset_filepath(const std::string &asset_path,
82 const std::string &stage_path,
83 const USDExportParams &export_params);
84
85} // namespace io::usd
86} // namespace blender
pxr::TfToken token_for_input(const StringRef input_name)
void create_usd_viewport_material(const USDExporterContext &usd_export_context, const Material *material, const pxr::UsdShadeMaterial &usd_material)
void export_texture(Image *ima, const pxr::UsdStageRefPtr stage, const bool allow_overwrite, ReportList *reports)
std::string get_tex_image_asset_filepath(Image *ima, const pxr::UsdStageRefPtr stage, const USDExportParams &export_params)
pxr::UsdShadeMaterial create_usd_material(const USDExporterContext &usd_export_context, pxr::SdfPath usd_path, const Material *material, const std::string &active_uvmap_name, ReportList *reports)
BMesh Iterators.