Hey!
I want to trigger some action after the export of a clip has ended. The information I need is the absolute file path of the exported clip and the preset that was used. Unfortunately I can’t get this info from just one hook.
post_export() gives me the preset path in info[“presetPath”].
post_export_asset gives the destination and the resolved path, so I can construct an absolute path from that.
In order to get these two informations in one I thought I could populate the userData in pre_export with the presetPath, since - according to the manual - the userData is always passed downstream:
https://help.autodesk.com/view/FLAME/2022/ENU/?guid=Flame_API_Python_Hooks_Reference_Python_Hooks_Tips_html
Here’s what I did:
def pre_export(info, userData, *args, **kwargs):
if not userData:
userData = {}
userData["presetPath"] = info["presetPath"]
return userData
def post_export_asset(info, userData, *args, **kwargs):
print(userData)
Unfortunately the userData printed from post_export_asset is None. Isn’t returning something from the hook the supposed method for passing the userData? I couldn’t find anything in the docs or examples concerning this.
@fredwarren How would I pass the data correctly?
Thanks in advance!
Claus