How to get the asset type?
mikek
Posts: 195
For assets who aren't loaded but selected is there a way to get the asset type?
I have the DzAsset object via getSelectedAssets() but most of the fields are empty. "contentType", "userCategories", "compatibilities", "categories", "compatabilityBase" are all empty. It's the same with the asset manager and getTypeForContentFile.
The information is there as it is displayed when hovering over the asset ("Type: wearable", "Type: preset_material" and such). Any way to access that type information in code?
Comments
This was as far as I got to getting the "type: wearable". Note that if the vendor or whoever didn't add metadata to the asset, it doesn't work.
The reason why you see those properties being empty is because it's actually empty. If you try it out on the base Genesis 8 Male, it will work.
I'm assuming this is after loading the figure?
What I try to do is get the information before loading anything into the scene. Currently it looks like this but returns always 0 (an asset has be be selected in the Content Library pane before running it):