The following functions are necessary to be implemented in a plug-in DLL. The plug-in own operations are written in each function.
o: Required, x: Not necessary
void MQGetPlugInID(DWORD *Product, DWORD *ID);
It gets a product (author) name and a product ID in all 64-bit value.
You can choose a random value which is not overlapped with other plug-ins for Product and ID.
This function is called when Metasequoia starts up.
Create | Export | Import | Object | Select | Station | Command |
o | o | o | o | o | o | o |
const char *MQGetPlugInName(void);
It gets a plug-in name displayed in the [About plug-ins] dialog.
This function is called when the dialog is shown.
Create | Export | Import | Object | Select | Station | Command |
o | o | o | o | o | o | o |
int MQGetPlugInType(void);
It gets a type of a plug-in.
This function is called when Metasequoia starts up.
Create | Export | Import | Object | Select | Station | Command |
o | o | o | o | o | o | o |
const char *MQEnumFileType(int index);
It gets a file extension with the specified index. The extension is used in a file dialog.
This function is called when Metasequoia starts up. The 'index' is called sequentially from 0, and the call ends when this function returns NULL.
Create | Export | Import | Object | Select | Station | Command |
x | o | o | x | x | x | x |
const char *MQEnumFileExt(int index);
It gets a file extension with the specified index. The extension is used in a file dialog.
This function is called when Metasequoia starts up. The 'index' is called sequentially from 0, and the call ends when this function returns NULL.
Create | Export | Import | Object | Select | Station | Command |
x | o | o | x | x | x | x |
BOOL MQImportFile(int index, const char *filename, MQDocument doc);
BOOL MQImportFileW(int index, const wchar_t *filename, MQDocument doc);
It loads data from a file and adds objects to a document.
It must return FALSE when it cannot load the file normally, the file contains unknown format, no valid object exists or an error has been occurred.
An encoding of 'filename' in MQImportFile() is ANSI in Windows, and utf-8 in Mac.
(in Rev4.70)
MQImportFileW() has been added. MQImportFileW() is recommended, but MQImportFile() is also available for the compatibility.
Create | Export | Import | Object | Select | Station | Command |
x | x | o | x | x | x | x |
BOOL MQExportFile(int index, const char *filename, MQDocument doc);
BOOL MQExportFileW(int index, const wchar_t *filename, MQDocument doc);
It writes objects in a document to a file.
It must return FALSE when the export was failed for some reason.
An encoding of 'filename' in MQExportFile() is ANSI in Windows, and utf-8 in Mac.
(in Rev4.70)
MQExportFileW() has been added. MQExportFileW() is recommended, but MQExportFile() is also available for the compatibility.
Create | Export | Import | Object | Select | Station | Command |
x | o | x | x | x | x | x |
const char *MQEnumString(int index);
const wchar_t *MQEnumStringW(int index);
It returns a string of a specific purpose which respond to the plug-in type.
The string is displayed in a menu if the plug-in type is Create, Object, Select or Station. The string is displayed on a button if the plug-in type is Command.
(in Rev4.70)
MQEnumStringW() has been added. MQEnumStringW() is recommended, but MQEnumString() is also available for the compatibility.
Create | Export | Import | Object | Select | Station | Command |
o | x | x | o | o | o | o |
BOOL MQCreate(int index, MQDocument doc);
An object will be created and registered to the document in this function.
Create | Export | Import | Object | Select | Station | Command |
o | x | x | x | x | x | x |
BOOL MQModifyObject(int index, MQDocument doc);
The current object will be modified in this function.
Create | Export | Import | Object | Select | Station | Command |
x | x | x | o | x | x | x |
BOOL MQModifySelect(int index, MQDocument doc);
The selected vertices, lines and faces will be modified in this function.
Create | Export | Import | Object | Select | Station | Command |
x | x | x | x | o | x | x |
BOOL MQOnEvent(MQDocument doc, int event_type, void *option);
(new in Rev2.40)
This function is called when some processes has been executed in Metasequoia. A station or command plug-in must do with the event properly.
Create | Export | Import | Object | Select | Station | Command |
x | x | x | x | x | o | o |