IExportContext Material missing Appearance Asset data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone!
I am currently trying to retrieve the material properties from the AppearanceAsset using the IExportContext but I have encountered some issues. For some reason some assets do not have any property (asset.Size == 0), therefore when trying to search for any property like "BaseSchema" I get null.
The code snippet goes like this
public void OnMaterial(MaterialNode node)
{
var currentMaterialId = node.MaterialId;
Asset currentAsset = node.HasOverriddenAppearance ? node.GetAppearanceOverride() : node.GetAppearance();
var baseSchemaProperty = currentAsset.FindByName("BaseSchema");
}
What is weird it that the material does have the right appearance asset set, is there a solution for this or am I missing something?
Thanks in advance!
@jeremy_tammik