Read asset metadata from different DCC software

Hi everyone!
I’m slowly digging into some sort of pipeline tools and I’d like to retrive some metadata from my assets.
The source FBX files can come from different software (3dsmax, maya or blender): store data inside the fbx is not a problem at all but issues arise when reading them in unreal.
As documented, metadata from 3dsmax come in a single string containing all custo properties that we can read accessing the tag FBX.UDP3DSMAX.
The other 2 sw instead have the same behaviour, so they both produce nice and clean FBX.myTag1, FBX.myTag2, …
This means that without 3dsmax in the field I could ignore (as wished) the source software and look everytime for the same tags…
But 3dsmax is there…
Could any of you advice me with some workaround? It seems quite stupid to me to code two different pipelines…

Many thanks in advance!

I’ve set up this rough script :slight_smile:
It works… but not very elegant I suppose

import unreal as ue
import re

class EditorUtility(ue.GlobalEditorUtilityBase):

def GetAssetProperty (asset,tag):

    all3dsmaxProperties = ue.EditorAssetLibrary.get_metadata_tag(asset, "FBX.UDP3DSMAX")
    if not all3dsmaxProperties is "":
        splittedProperties = re.split(" = |\\r\
        if tag in splittedProperties:
            return splittedProperties(splittedProperties.index(tag)) + 1]
        return ue.EditorAssetLibrary.get_metadata_tag(asset, "FBX."+tag)

editorUtility = EditorUtility()
asset = (editorUtility.get_selected_assets())[0]

print GetAssetProperty(asset,"artist")