Blender
V3.3
|
#include "usd_reader_material.h"
#include "BKE_image.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_node_tree_update.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "DNA_material_types.h"
#include <pxr/base/gf/vec3f.h>
#include <pxr/usd/usdShade/material.h>
#include <pxr/usd/usdShade/shader.h>
#include <iostream>
#include <vector>
Go to the source code of this file.
Namespaces | |
usdtokens | |
blender | |
blender::io | |
blender::io::usd | |
Functions | |
static const pxr::TfToken | usdtokens::a ("a", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::b ("b", pxr::TfToken::Immortal) |
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::diffuseColor ("diffuseColor", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::emissiveColor ("emissiveColor", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::file ("file", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::g ("g", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::ior ("ior", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::metallic ("metallic", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::normal ("normal", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::occlusion ("occlusion", 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::r ("r", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::result ("result", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::rgb ("rgb", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::rgba ("rgba", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::roughness ("roughness", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::sourceColorSpace ("sourceColorSpace", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::specularColor ("specularColor", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::st ("st", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::varname ("varname", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::raw ("raw", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::RAW ("RAW", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::UsdPreviewSurface ("UsdPreviewSurface", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::UsdPrimvarReader_float2 ("UsdPrimvarReader_float2", pxr::TfToken::Immortal) |
static const pxr::TfToken | usdtokens::UsdUVTexture ("UsdUVTexture", pxr::TfToken::Immortal) |
static bNode * | add_node (const bContext *C, bNodeTree *ntree, const int type, const float locx, const float locy) |
static void | link_nodes (bNodeTree *ntree, bNode *source, const char *sock_out, bNode *dest, const char *sock_in) |
static bool | needs_blend (const pxr::UsdShadeShader &usd_shader) |
static float | get_opacity_threshold (const pxr::UsdShadeShader &usd_shader, float default_value=0.0f) |
static pxr::TfToken | get_source_color_space (const pxr::UsdShadeShader &usd_shader) |
static bool | get_usd_preview_surface (const pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeShader &r_preview_surface) |
static void | set_viewport_material_props (Material *mtl, const pxr::UsdShadeShader &usd_preview) |
|
static |
Definition at line 64 of file usd_reader_material.cc.
References C, bNode::locx, bNode::locy, nodeAddStaticNode(), ntree, and type.
Referenced by blender::io::usd::USDMaterialReader::convert_usd_primvar_reader_float2(), blender::io::usd::USDMaterialReader::convert_usd_uv_texture(), do_versions_material_convert_legacy_blend_mode(), blender::io::usd::USDMaterialReader::follow_connection(), and blender::io::usd::USDMaterialReader::import_usd_preview().
|
static |
Definition at line 127 of file usd_reader_material.cc.
References usdtokens::opacityThreshold().
Referenced by blender::io::usd::USDMaterialReader::import_usd_preview().
|
static |
Definition at line 149 of file usd_reader_material.cc.
References usdtokens::sourceColorSpace().
Referenced by blender::io::usd::USDMaterialReader::load_tex_image().
|
static |
Definition at line 172 of file usd_reader_material.cc.
References usdtokens::UsdPreviewSurface().
Referenced by blender::io::usd::USDMaterialReader::add_material().
|
static |
Definition at line 78 of file usd_reader_material.cc.
References dest, nodeAddLink(), nodeFindSocket(), ntree, SOCK_IN, and SOCK_OUT.
Referenced by blender::io::usd::USDMaterialReader::convert_usd_primvar_reader_float2(), blender::io::usd::USDMaterialReader::convert_usd_uv_texture(), blender::io::usd::USDMaterialReader::follow_connection(), and blender::io::usd::USDMaterialReader::import_usd_preview().
|
static |
Definition at line 100 of file usd_reader_material.cc.
References usdtokens::opacity().
Referenced by blender::io::usd::USDMaterialReader::import_usd_preview().
|
static |
Definition at line 193 of file usd_reader_material.cc.
References Material::b, color, usdtokens::diffuseColor(), Material::g, usdtokens::metallic(), Material::metallic, Material::r, usdtokens::roughness(), and Material::roughness.
Referenced by blender::io::usd::USDMaterialReader::add_material().