Sign in to follow this  
Rick Brewster

Rules for plugins that are published on this forum

Recommended Posts

Is it OK to add metadata to the document in the OnSaveT method of a filetype plugin?

Reason: Some (few) documents provide an ICC Profile (Exif 0x8773). I like to offer the possibility to use the document profile or to embed an external one during save. In this case I would like to rember the profile in the document.

Share this post


Link to post
Share on other sites

Don't modify the input in OnSave(). (note to self: make the Document read-only for the duration of OnSave)

For the output, you can embed whatever you want for the file type that you're saving as. This doesn't require you to do anything Paint.NET-specific.

Share this post


Link to post
Share on other sites

I don't Need it right now, I found a better Workaround, but just out of curiosity:

 

Would it be alright to use a reflection "hack" to Change something in my own effects IndirectUI? (e.g. Setting a Checkbox to false when the Dialog is shown Independent of the last token)

Share this post


Link to post
Share on other sites

Reflection = no. I will remove your plugin from the forum.

 

However, as usual, if you're just doing something for yourself (e.g. not publishing it on this forum) then you can do whatever you want.

Share this post


Link to post
Share on other sites

New rule added to clarify this. see also: http://forums.getpaint.net/index.php?/topic/107032-tile/#entry511100

 

 

Plugins must not use reflection to reach into Paint.NET's internals.

If something is private or internal, then it's off-limits. Do not use reflection to reach in to get access. This includes instantiating classes, accessing private fields, etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this