Jump to content

Saving Without a Dialog Box


Recommended Posts

Why does it have all the options for the DDS file type?

I have no idea - I used the dds as a guide when creating the template but I know all the code in the plugin. Maybe it's the default of the class with no overrides.

Edit: Sorry, it turned out to be because of a conflict problem with AVIImporter which I have now updated. May I suggest you update PDN to identify plugins by name rather than index (or at least count through plugins not supporting the given action) because I believe that is the cause of the problem.

KaHuc.png
Link to comment
Share on other sites

I don't follow you. The configuration UI is pulled from the FileType instance by calling CreateSaveConfigWidget(). If your code was copied from DDS for that, then it will have the same config UI as DDS.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I don't follow you. The configuration UI is pulled from the FileType instance by calling CreateSaveConfigWidget(). If your code was copied from DDS for that, then it will have the same config UI as DDS.

I didn't copy it from that - I used it as a reference to create the template and I didn't add any non-relevant code.

But what about the index thing?

KaHuc.png
Link to comment
Share on other sites

Make sure your implementation of IFileTypeFactory is correct. Why are you saying that Paint.NET is using an index for identity? Did you look at the code, or are you just inferring/guessing?

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Make sure your implementation of IFileTypeFactory is correct. Why are you saying that Paint.NET is using an index for identity? Did you look at the code, or are you just inferring/guessing?

I didn't actually look at the code - but from my problems I am pretty sure it is an indexing consistancey issue.

KaHuc.png
Link to comment
Share on other sites

You don't have any logic or proof to back that claim up though. You're just venturing a guess, but asserting it as fact.

If you don't want a save configuration dialog for your file type, then you should NOT implement the virtual method CreateSaveConfigWidget(). Nor should you implement the virtual method OnCreateDefaultSaveConfigToken().

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

If you don't want a save configuration dialog for your file type, then you should NOT implement the virtual method CreateSaveConfigWidget(). Nor should you implement the virtual method OnCreateDefaultSaveConfigToken().

I didn't origionally, which was causing the problems, now that I have everything works.

KaHuc.png
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...