Blender V5.3
blender::io::usd::USDMaterialImportContext Class Reference

Public Member Functions

 USDMaterialImportContext (pxr::UsdStageRefPtr stage, const USDImportParams &params, ReportList *reports)
pxr::UsdStageRefPtr get_stage () const
python::tuple import_texture (const std::string &asset_path) const

Detailed Description

Definition at line 243 of file usd_hook.cc.

Constructor & Destructor Documentation

◆ USDMaterialImportContext()

blender::io::usd::USDMaterialImportContext::USDMaterialImportContext ( pxr::UsdStageRefPtr stage,
const USDImportParams & params,
ReportList * reports )
inline

Definition at line 250 of file usd_hook.cc.

Member Function Documentation

◆ get_stage()

pxr::UsdStageRefPtr blender::io::usd::USDMaterialImportContext::get_stage ( ) const
inline

Definition at line 257 of file usd_hook.cc.

Referenced by blender::io::usd::register_hook_converters().

◆ import_texture()

python::tuple blender::io::usd::USDMaterialImportContext::import_texture ( const std::string & asset_path) const
inline

If the given texture asset path is a URI or is relative to a USDZ archive, attempt to copy the texture to the local file system and returns a tuple[str, bool], containing the asset's local path and a boolean indicating whether the path references a temporary file (in the case where imported textures should be packed). The original asset path will be returned unchanged if it's already a local file or if it could not be copied to a local destination.

Definition at line 270 of file usd_hook.cc.

References blender::io::usd::import_asset(), blender::io::usd::Overwrite, blender::io::usd::Pack, blender::io::usd::should_import_asset(), and blender::io::usd::temp_textures_dir().

Referenced by blender::io::usd::register_hook_converters().


The documentation for this class was generated from the following file: