Is there a Basic documentation/how to for writing FileType plugins?
I've tried with the help of examples found online and based on the source of plugins like TinyPNG, but I cannot get PDN to Show me my plugin when I click "Save as...".
This is what I have so far, any help would be appreciated. (It's a save-only plugin):
public sealed class TestFileType : FileType, IFileTypeFactory
{
TestFileType()
: base("Test", FileTypeFlags.SupportsSaving | FileTypeFlags.SavesWithProgress, new[] { ".test" }) { }
protected override Document OnLoad(Stream input)
{
return null;
}
protected override void OnSave(Document input, Stream output, SaveConfigToken token, Surface surface, ProgressEventHandler callback)
{
// Do save operation...
base.OnSave(input, output, token, surface, callback);
}
FileType[] IFileTypeFactory.GetFileTypeInstances()
{
return new[] { new TestFileType() };
}
}