Blender V5.0
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
12struct bNode;
13struct Image;
14struct Material;
15struct ReportList;
16
17namespace blender::io::usd {
18
20struct USDExportParams;
21
28pxr::UsdShadeMaterial create_usd_material(const USDExporterContext &usd_export_context,
29 pxr::SdfPath usd_path,
30 Material *material,
31 const std::string &active_uvmap_name,
32 ReportList *reports);
33
38pxr::TfToken token_for_input(const StringRef input_name);
39
40void export_texture(bNode *node,
41 const pxr::UsdStageRefPtr stage,
42 const bool allow_overwrite = false,
43 ReportList *reports = nullptr);
44
45void export_texture(Image *ima,
46 const pxr::UsdStageRefPtr stage,
47 const bool allow_overwrite = false,
48 ReportList *reports = nullptr);
49
59std::string get_tex_image_asset_filepath(bNode *node,
60 const pxr::UsdStageRefPtr stage,
61 const USDExportParams &export_params);
62
63std::string get_tex_image_asset_filepath(Image *ima,
64 const pxr::UsdStageRefPtr stage,
65 const USDExportParams &export_params);
72std::string get_tex_image_asset_filepath(const std::string &asset_path,
73 const std::string &stage_path,
74 const USDExportParams &export_params);
75
76} // namespace blender::io::usd
struct Image Image
struct Material Material
struct bNode bNode
static void export_texture(const USDExporterContext &usd_export_context, bNode *node)
pxr::TfToken token_for_input(const StringRef input_name)
static std::string get_tex_image_asset_filepath(const USDExporterContext &usd_export_context, bNode *node)
pxr::UsdShadeMaterial create_usd_material(const USDExporterContext &usd_export_context, pxr::SdfPath usd_path, Material *material, const std::string &active_uvmap_name, ReportList *reports)