Blender V4.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 <pxr/usd/usdShade/material.h>
7
8#include <string>
9
10struct bNode;
11struct Image;
12struct Material;
13struct ReportList;
14
15namespace blender::io::usd {
16
17struct USDExporterContext;
18struct USDExportParams;
19
26pxr::UsdShadeMaterial create_usd_material(const USDExporterContext &usd_export_context,
27 pxr::SdfPath usd_path,
28 Material *material,
29 const std::string &active_uvmap_name,
30 ReportList *reports);
31
36pxr::TfToken token_for_input(const char *input_name);
37
38void export_texture(bNode *node,
39 const pxr::UsdStageRefPtr stage,
40 const bool allow_overwrite = false,
41 ReportList *reports = nullptr);
42
52std::string get_tex_image_asset_filepath(bNode *node,
53 const pxr::UsdStageRefPtr stage,
54 const USDExportParams &export_params);
55
56std::string get_tex_image_asset_filepath(Image *ima,
57 const pxr::UsdStageRefPtr stage,
58 const USDExportParams &export_params);
65std::string get_tex_image_asset_filepath(const std::string &asset_path,
66 const std::string &stage_path,
67 const USDExportParams &export_params);
68
69} // namespace blender::io::usd
EvaluationStage stage
Definition deg_eval.cc:83
static void export_texture(const USDExporterContext &usd_export_context, bNode *node)
pxr::TfToken token_for_input(const char *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)