Link Exporter to a button in an 'addon'?

So, I’m making a little addon to help streamline a workflow from blender to AE. In this addon, I’d like to add a button that links to the AE exporter, or more specifically, I’m trying to get my button press to do the exact same thing as pressing the export button.

I’ve turned on the ‘developer tools’ option in my preferences, so the first thing I’ve tried is to simply copy the code from that button. In short… that doesn’t work, and I’m not really sure why. Shouldn’t that call the same action?


In an attempt to troubleshoot myself, I tried to isolate the action by doing this and trying to run it, but that also fails [see below]. I suspect that it’s failing because it’s looking for a place to save, and that’s not defined in this snippet of code. regardless, I’m confused as to why running this code alone doesn’t load the ‘save dialog box’, like it does when you regularly press the tab in the ‘Export’ dropdown.

I’m simply an artist and know pretty much zero python, so I’m just scratching the surface on learning. This is the last step to finish my little addon panel, and any help on solving it would be super helpful. Attached is the script, if anyone wants to test it, but you’ll need to turn on the experimental AE exporter in your addon preferences. thanks in advance :grinning:

AENulls_addon_09.py (5.8 KB)

Maybe this helps