PythonAPI: Unable to convert AssetMetadata array to FPValue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hey there,
i'm trying to run maxscript's getMAXFileAssetMetadata function via MaxPlus.Core.EvalMAXScript.
unfortunately EvalMAXScript seems to have no idea how to give me back the return values.
in max2011 and blur's python bridge i could simply say:
data = mxs.getMAXFileAssetMetadata(maxfile) for item in data: print item.filename
in max2015 however i can't get it to work since the return value of EvalMaxscript has to be a FPValue and Max can't convert the resulting array
res = MaxPlus.FPValue() evaluation_success = MaxPlus.Core.EvalMAXScript("setMAXFileAssetMetadata(\""+maxfile+"\")",res) data = res.Get()
will print:
-- Unable to convert: (AssetMetadata_StructDef assetId:"{BAFDA420-0D1F-49FA-8631-E8C405C11E09}" filename: [...] to type: FPValue
any idead how to work around this issue?
the only thing coming to mind would be evaluating a maxscript that dumps all the data to a textfile and then rereading it in python but that seems to be a rather unholy way of doing things.
cheers
mikko