unreal.UsdMaterialAssetUserData

class unreal.UsdMaterialAssetUserData(outer: Object | None = None, name: Name | str = 'None')

Bases: UsdAssetUserData

AssetImportData assigned to Unreal materials that are generated when parsing USD Material prims

C++ Source:

  • Plugin: USDImporter

  • Module: USDClasses

  • File: USDAssetUserData.h

Editor Properties: (see get_editor_property/set_editor_property)

  • parameter_to_primvar (Map[str, str]): [Read-Write] In the context of our reference materials that just read a single texture for each material parameter, this describes the primvar that the USD material is sampling for each texture. e.g. {‘BaseColor’: ‘st0’, ‘Metallic’: ‘st1’}

  • prim_paths (Array[str]): [Read-Write] Paths to prims that generated the asset that owns this AssetUserData

  • primvar_to_uv_index (Map[str, int32]): [Read-Write] In the context of our reference materials that just read a single texture for each material parameter, this describes the Unreal UV index that will be used for sampling by each USD primvar. The idea is to use this in combination with ParameterToPrimvar, in order to describe which UV index the material has currently assigned to each parameter. When assigning the material to meshes later, we’ll compare this member with the UUsdMeshAssetImportData’s own PrimvarToUVIndex to see if they are compatible or not, and if not spawn a new material instance that is. e.g. {‘firstPrimvar’: 0, ‘st’: 1, ‘st1’: 2}

  • stage_identifier_to_metadata (Map[str, UsdCombinedPrimMetadata]): [Read-Write] Holds metadata collected for this asset, from all relevant Source prims. The asset that owns this user data may be shared via the asset cache, and reused for even entirely different stages. This map lets us keep track of which stage owns which bits of metadata

property parameter_to_primvar: None

[Read-Write] In the context of our reference materials that just read a single texture for each material parameter, this describes the primvar that the USD material is sampling for each texture. e.g. {‘BaseColor’: ‘st0’, ‘Metallic’: ‘st1’}

Type:

(Map[str, str])

property primvar_to_uv_index: None

[Read-Write] In the context of our reference materials that just read a single texture for each material parameter, this describes the Unreal UV index that will be used for sampling by each USD primvar. The idea is to use this in combination with ParameterToPrimvar, in order to describe which UV index the material has currently assigned to each parameter. When assigning the material to meshes later, we’ll compare this member with the UUsdMeshAssetImportData’s own PrimvarToUVIndex to see if they are compatible or not, and if not spawn a new material instance that is. e.g. {‘firstPrimvar’: 0, ‘st’: 1, ‘st1’: 2}

Type:

(Map[str, int32])