Blender V5.0
usd_writer_material.cc File Reference
#include "usd_writer_material.hh"
#include "usd_asset_utils.hh"
#include "usd_exporter_context.hh"
#include "usd_hook.hh"
#include "usd_utils.hh"
#include "BKE_image.hh"
#include "BKE_image_format.hh"
#include "BKE_library.hh"
#include "BKE_main.hh"
#include "BKE_node.hh"
#include "BKE_node_legacy_types.hh"
#include "BKE_node_runtime.hh"
#include "BKE_report.hh"
#include "IMB_colormanagement.hh"
#include "IMB_imbuf.hh"
#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLI_map.hh"
#include "BLI_path_utils.hh"
#include "BLI_set.hh"
#include "BLI_string.h"
#include "BLI_string_ref.hh"
#include "BLI_string_utils.hh"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_packedFile_types.h"
#include "MEM_guardedalloc.h"
#include "WM_types.hh"
#include <pxr/base/tf/stringUtils.h>
#include "CLG_log.h"

Go to the source code of this file.

Classes

struct  blender::io::usd::InputSpec

Namespaces

namespace  usdtokens
namespace  blender
namespace  blender::io
namespace  blender::io::usd

Typedefs

using blender::io::usd::InputSpecMap = blender::Map<StringRef, InputSpec>

Functions

static const pxr::TfToken usdtokens::clearcoat ("clearcoat", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::clearcoatRoughness ("clearcoatRoughness", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::diffuse_color ("diffuseColor", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::emissive_color ("emissiveColor", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::metallic ("metallic", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::preview_shader ("previewShader", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::preview_surface ("UsdPreviewSurface", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::UsdTransform2d ("UsdTransform2d", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::uv_texture ("UsdUVTexture", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::primvar_float ("UsdPrimvarReader_float", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::primvar_float2 ("UsdPrimvarReader_float2", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::primvar_float3 ("UsdPrimvarReader_float3", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::primvar_vector ("UsdPrimvarReader_vector", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::roughness ("roughness", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::specular ("specular", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::opacity ("opacity", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::opacityThreshold ("opacityThreshold", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::surface ("surface", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::displacement ("displacement", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::rgb ("rgb", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::r ("r", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::g ("g", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::b ("b", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::a ("a", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::st ("st", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::result ("result", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::varname ("varname", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::out ("out", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::normal ("normal", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::ior ("ior", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::file ("file", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::raw ("raw", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::scale ("scale", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::bias ("bias", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::sRGB ("sRGB", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::sourceColorSpace ("sourceColorSpace", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::black ("black", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::clamp ("clamp", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::repeat ("repeat", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::mirror ("mirror", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::wrapS ("wrapS", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::wrapT ("wrapT", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::in ("in", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::translation ("translation", pxr::TfToken::Immortal)
static const pxr::TfToken usdtokens::rotation ("rotation", pxr::TfToken::Immortal)
static pxr::UsdShadeShader blender::io::usd::create_usd_preview_shader (const USDExporterContext &usd_export_context, const pxr::UsdShadeMaterial &material, const StringRef name, int type)
static pxr::UsdShadeShader blender::io::usd::create_usd_preview_shader (const USDExporterContext &usd_export_context, const pxr::UsdShadeMaterial &material, bNode *node)
static pxr::UsdShadeShader blender::io::usd::create_primvar_reader_shader (const USDExporterContext &usd_export_context, const pxr::UsdShadeMaterial &material, const pxr::TfToken &primvar_type, const bNode *node)
static void blender::io::usd::create_uv_input (const USDExporterContext &usd_export_context, bNodeSocket *input_socket, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeInput &usd_input, const std::string &active_uvmap_name, ReportList *reports)
static void blender::io::usd::export_texture (const USDExporterContext &usd_export_context, bNode *node)
static bNodeblender::io::usd::find_bsdf_node (Material *material)
static bNodeblender::io::usd::find_displacement_node (Material *material)
static void blender::io::usd::get_absolute_path (const Image *ima, char *r_path)
static std::string blender::io::usd::get_tex_image_asset_filepath (const USDExporterContext &usd_export_context, bNode *node)
static const InputSpecMapblender::io::usd::preview_surface_input_map ()
static bNodeLinkblender::io::usd::traverse_channel (bNodeSocket *input, short target_type)
void blender::io::usd::set_normal_texture_range (pxr::UsdShadeShader &usd_shader, const InputSpec &input_spec)
template<typename T1, typename T2>
void blender::io::usd::create_input (pxr::UsdShadeShader &shader, const InputSpec &spec, const void *value, float scale)
static void blender::io::usd::set_scale_bias (pxr::UsdShadeShader &usd_shader, const pxr::GfVec4f scale, const pxr::GfVec4f bias)
static void blender::io::usd::process_inputs (const USDExporterContext &usd_export_context, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeShader &shader, const bNode *node, const std::string &active_uvmap_name, ReportList *reports)
static void blender::io::usd::create_usd_preview_surface_material (const USDExporterContext &usd_export_context, Material *material, pxr::UsdShadeMaterial &usd_material, const std::string &active_uvmap_name, ReportList *reports)
static void blender::io::usd::create_usd_viewport_material (const USDExporterContext &usd_export_context, const Material *material, const pxr::UsdShadeMaterial &usd_material)
static void blender::io::usd::create_uvmap_shader (const USDExporterContext &usd_export_context, const bNodeLink *uvmap_link, const pxr::UsdShadeMaterial &usd_material, const pxr::UsdShadeInput &usd_input, const std::string &active_uvmap_name, ReportList *reports)
static void blender::io::usd::create_transform2d_shader (const USDExporterContext &usd_export_context, bNodeLink *mapping_link, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeInput &usd_input, const std::string &uvmap_name, ReportList *reports)
static bool blender::io::usd::has_generated_tiles (const Image *ima)
static bool blender::io::usd::is_in_memory_texture (Image *ima)
static bool blender::io::usd::is_packed_texture (const Image *ima)
static std::string blender::io::usd::get_in_memory_texture_filename (Image *ima)
static void blender::io::usd::export_in_memory_imbuf (ImBuf *imbuf, const std::string &export_dir, const char image_abs_path[FILE_MAX], const char file_name[FILE_MAX], const bool allow_overwrite, ReportList *reports)
static void blender::io::usd::export_in_memory_texture (Image *ima, const std::string &export_dir, const bool allow_overwrite, ReportList *reports)
static void blender::io::usd::export_packed_texture (Image *ima, const std::string &export_dir, const bool allow_overwrite, ReportList *reports)
static pxr::TfToken blender::io::usd::get_node_tex_image_color_space (const bNode *node)
static pxr::TfToken blender::io::usd::get_node_tex_image_wrap (const bNode *node)
static std::string blender::io::usd::get_tex_image_asset_filepath (const Image *ima)
std::string blender::io::usd::get_tex_image_asset_filepath (Image *ima, const pxr::UsdStageRefPtr stage, const USDExportParams &export_params)
std::string blender::io::usd::get_tex_image_asset_filepath (const std::string &path, const std::string &stage_path, const USDExportParams &export_params)
std::string blender::io::usd::get_tex_image_asset_filepath (bNode *node, const pxr::UsdStageRefPtr stage, const USDExportParams &export_params)
static void blender::io::usd::copy_tiled_textures (Image *ima, const std::string &dest_dir, const bool allow_overwrite, ReportList *reports)
static void blender::io::usd::copy_single_file (const Image *ima, const std::string &dest_dir, const bool allow_overwrite, ReportList *reports)
void blender::io::usd::export_texture (Image *ima, const pxr::UsdStageRefPtr stage, const bool allow_overwrite, ReportList *reports)
void blender::io::usd::export_texture (bNode *node, const pxr::UsdStageRefPtr stage, const bool allow_overwrite, ReportList *reports)
pxr::TfToken blender::io::usd::token_for_input (const StringRef input_name)
pxr::UsdShadeMaterial blender::io::usd::create_usd_material (const USDExporterContext &usd_export_context, pxr::SdfPath usd_path, Material *material, const std::string &active_uvmap_name, ReportList *reports)

Variables

static CLG_LogRef LOG = {"io.usd"}

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"io.usd"}
static

Definition at line 50 of file usd_writer_material.cc.