Blender  V3.3
Classes | Namespaces | Typedefs | Functions
usd_writer_material.cc File Reference
#include "usd_writer_material.h"
#include "usd.h"
#include "usd_exporter_context.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "IMB_colormanagement.h"
#include "BLI_fileops.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "DNA_material_types.h"
#include "MEM_guardedalloc.h"
#include "WM_api.h"
#include <pxr/base/tf/stringUtils.h>
#include <pxr/pxr.h>
#include <pxr/usd/usdGeom/scope.h>
#include <iostream>

Go to the source code of this file.

Classes

struct  blender::io::usd::InputSpec
 

Namespaces

 usdtokens
 
 cyclestokens
 
 blender
 
 blender::io
 
 blender::io::usd
 

Typedefs

using blender::io::usd::InputSpecMap = std::map< std::string, 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::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::uv_texture ("UsdUVTexture", pxr::TfToken::Immortal)
 
static const pxr::TfToken usdtokens::primvar_float2 ("UsdPrimvarReader_float2", 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::surface ("surface", pxr::TfToken::Immortal)
 
static const pxr::TfToken usdtokens::perspective ("perspective", pxr::TfToken::Immortal)
 
static const pxr::TfToken usdtokens::orthographic ("orthographic", 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::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::preview ("preview", pxr::TfToken::Immortal)
 
static const pxr::TfToken usdtokens::raw ("raw", 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::Shader ("Shader", pxr::TfToken::Immortal)
 
static const pxr::TfToken cyclestokens::UVMap ("UVMap", pxr::TfToken::Immortal)
 
static pxr::UsdShadeShader blender::io::usd::create_usd_preview_shader (const USDExporterContext &usd_export_context, pxr::UsdShadeMaterial &material, const char *name, int type)
 
static pxr::UsdShadeShader blender::io::usd::create_usd_preview_shader (const USDExporterContext &usd_export_context, pxr::UsdShadeMaterial &material, bNode *node)
 
static void blender::io::usd::create_uvmap_shader (const USDExporterContext &usd_export_context, bNode *tex_node, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeShader &usd_tex_shader, const pxr::TfToken &default_uv)
 
static void blender::io::usd::export_texture (bNode *node, const pxr::UsdStageRefPtr stage, const bool allow_overwrite=false)
 
static bNodeblender::io::usd::find_bsdf_node (Material *material)
 
static void blender::io::usd::get_absolute_path (Image *ima, char *r_path)
 
static std::string blender::io::usd::get_tex_image_asset_path (bNode *node, const pxr::UsdStageRefPtr stage, const USDExportParams &export_params)
 
static InputSpecMap & blender::io::usd::preview_surface_input_map ()
 
static bNodeblender::io::usd::traverse_channel (bNodeSocket *input, short target_type)
 
template<typename T1 , typename T2 >
void blender::io::usd::create_input (pxr::UsdShadeShader &shader, const InputSpec &spec, const void *value)
 
void blender::io::usd::create_usd_preview_surface_material (const USDExporterContext &usd_export_context, Material *material, pxr::UsdShadeMaterial &usd_material, const std::string &default_uv)
 
void blender::io::usd::create_usd_viewport_material (const USDExporterContext &usd_export_context, Material *material, pxr::UsdShadeMaterial &usd_material)
 
static std::string blender::io::usd::get_in_memory_texture_filename (Image *ima)
 
static void blender::io::usd::export_in_memory_texture (Image *ima, const std::string &export_dir, const bool allow_overwrite)
 
static pxr::TfToken blender::io::usd::get_node_tex_image_color_space (bNode *node)
 
static std::string blender::io::usd::get_tex_image_asset_path (Image *ima)
 
static void blender::io::usd::copy_tiled_textures (Image *ima, const std::string &dest_dir, const bool allow_overwrite)
 
static void blender::io::usd::copy_single_file (Image *ima, const std::string &dest_dir, const bool allow_overwrite)