Blender V4.5
blender::io::usd::USDMaterialImportContext Struct Reference

Public Member Functions

 USDMaterialImportContext ()
 USDMaterialImportContext (pxr::UsdStageRefPtr in_stage, const USDImportParams &in_params, ReportList *in_reports)
pxr::UsdStageRefPtr get_stage () const
PYTHON_NS::tuple import_texture (const std::string &asset_path) const

Public Attributes

pxr::UsdStageRefPtr stage
USDImportParams params
ReportListreports

Detailed Description

Definition at line 235 of file usd_hook.cc.

Constructor & Destructor Documentation

◆ USDMaterialImportContext() [1/2]

blender::io::usd::USDMaterialImportContext::USDMaterialImportContext ( )
inline

Definition at line 236 of file usd_hook.cc.

References nullptr, and reports.

◆ USDMaterialImportContext() [2/2]

blender::io::usd::USDMaterialImportContext::USDMaterialImportContext ( pxr::UsdStageRefPtr in_stage,
const USDImportParams & in_params,
ReportList * in_reports )
inline

Definition at line 238 of file usd_hook.cc.

References params, reports, and stage.

Member Function Documentation

◆ get_stage()

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

Definition at line 245 of file usd_hook.cc.

References stage.

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

◆ import_texture()

PYTHON_NS::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 258 of file usd_hook.cc.

References blender::io::usd::import_asset(), params, reports, blender::io::usd::should_import_asset(), blender::io::usd::temp_textures_dir(), blender::io::usd::USD_TEX_IMPORT_PACK, and blender::io::usd::USD_TEX_NAME_COLLISION_OVERWRITE.

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

Member Data Documentation

◆ params

USDImportParams blender::io::usd::USDMaterialImportContext::params

Definition at line 287 of file usd_hook.cc.

Referenced by import_texture(), and USDMaterialImportContext().

◆ reports

ReportList* blender::io::usd::USDMaterialImportContext::reports

Definition at line 288 of file usd_hook.cc.

Referenced by import_texture(), USDMaterialImportContext(), and USDMaterialImportContext().

◆ stage

pxr::UsdStageRefPtr blender::io::usd::USDMaterialImportContext::stage

Definition at line 286 of file usd_hook.cc.

Referenced by get_stage(), and USDMaterialImportContext().


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