PDA

View Full Version : Problems with ac_register_file_exporter


monster
22nd March 2004, 08:42 PM
Previously, in my plugin, I was using;
ac_add_command("my_exporter",my_exporter);
ac_add_export_menu_item("My Format...","ac3d my_exporter");
To register my export function with AC3D, as I use ac_register_file_importer to register my import function I thought I'd switch to use ac_register_file_exporter as it seemed to be more consistent (and possibly more up to date?).
However, now the exporter gets added to the export menu, but when I click on it nothing happens except that I get the following message in the console;
incorrect number of args for exporter_select_file (should be 1, got 2) - usage:
<string exporter-name>
I've changed my export function to have the signature;
Boolean my_exporter(char *filename, ACObject *object)
Is there anything else I need to do?

Andy
23rd March 2004, 03:54 AM
I suspect the exporter name has a space in it - this needs removing.

You are correct that adding an exporter this way is the way to go (although the old method will still work).

Andy

monster
23rd March 2004, 06:15 AM
Ah yes, that'll be it. Thanks Andy.
Interestingly though ac_register_file_importer works even with a space in the name!