Blender  V3.3
Functions
utils Namespace Reference

Functions

static void build_mat_map (const Main *bmain, std::map< std::string, Material * > *r_mat_map)
 
static pxr::UsdShadeMaterial compute_bound_material (const pxr::UsdPrim &prim)
 
static Materialfind_existing_material (const pxr::SdfPath &usd_mat_path, const USDImportParams &params, const std::map< std::string, Material * > &mat_map, const std::map< std::string, std::string > &usd_path_to_mat_name)
 
static void assign_materials (Main *bmain, Object *ob, const std::map< pxr::SdfPath, int > &mat_index_map, const USDImportParams &params, pxr::UsdStageRefPtr stage, std::map< std::string, Material * > &mat_name_to_mat, std::map< std::string, std::string > &usd_path_to_mat_name)
 

Function Documentation

◆ assign_materials()

static void utils::assign_materials ( Main bmain,
Object ob,
const std::map< pxr::SdfPath, int > &  mat_index_map,
const USDImportParams params,
pxr::UsdStageRefPtr  stage,
std::map< std::string, Material * > &  mat_name_to_mat,
std::map< std::string, std::string > &  usd_path_to_mat_name 
)
static

◆ build_mat_map()

static void utils::build_mat_map ( const Main bmain,
std::map< std::string, Material * > *  r_mat_map 
)
static

Definition at line 51 of file usd_reader_mesh.cc.

References ListBase::first, Material::id, material, Main::materials, ID::name, and ID::next.

◆ compute_bound_material()

static pxr::UsdShadeMaterial utils::compute_bound_material ( const pxr::UsdPrim &  prim)
static

Definition at line 65 of file usd_reader_mesh.cc.

◆ find_existing_material()

static Material* utils::find_existing_material ( const pxr::SdfPath &  usd_mat_path,
const USDImportParams params,
const std::map< std::string, Material * > &  mat_map,
const std::map< std::string, std::string > &  usd_path_to_mat_name 
)
static

Definition at line 73 of file usd_reader_mesh.cc.

References BLI_assert_unreachable, params, and USD_MTL_NAME_COLLISION_MAKE_UNIQUE.

Referenced by assign_materials().