Jump to content

Palette access?


jxp

Recommended Posts

Hi there,

I've got a couple of ideas for some plugins (very early stages yet). I've plenty of experience on C# but little on Paint.net so I thought I would ask for a bit of help.

For my effect I would like to be able to use/specify palettes to go with them. Is there any way to access the paint.net palette system? As far as I can tell this is basically a user shortcut and not accessible via the object model. Is that correct?

I guess I could manually read/write to the Paint.NET User Files\Palettes folder as a fallback.

(Just checked and Paint.net refreshes the palette list when new files are added to this folder. Sweet!)

EDIT: Had a root around with PDNResources and discovered the Palette folder is localised. I can get it using PdnInfo.UserDataPath and PdnResources.GetString("ColorPalettes.UserDataSubDirName") but there are several posts saying not to use PDNResources. :?

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

Hi there,

I've got a couple of ideas for some plugins (very early stages yet). I've plenty of experience on C# but little on Paint.net so I thought I would ask for a bit of help.

For my effect I would like to be able to use/specify palettes to go with them. Is there any way to access the paint.net palette system? As far as I can tell this is basically a user shortcut and not accessible via the object model. Is that correct?

I guess I could manually read/write to the Paint.NET User Files\Palettes folder as a fallback.

(Just checked and Paint.net refreshes the palette list when new files are added to this folder. Sweet!)

EDIT: Had a root around with PDNResources and discovered the Palette folder is localised. I can get it using PdnInfo.UserDataPath and PdnResources.GetString("ColorPalettes.UserDataSubDirName") but there are several posts saying not to use PDNResources. :?

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

Hi there,

I've got a couple of ideas for some plugins (very early stages yet). I've plenty of experience on C# but little on Paint.net so I thought I would ask for a bit of help.

For my effect I would like to be able to use/specify palettes to go with them. Is there any way to access the paint.net palette system? As far as I can tell this is basically a user shortcut and not accessible via the object model. Is that correct?

I guess I could manually read/write to the Paint.NET User Files\Palettes folder as a fallback.

(Just checked and Paint.net refreshes the palette list when new files are added to this folder. Sweet!)

EDIT: Had a root around with PDNResources and discovered the Palette folder is localised. I can get it using PdnInfo.UserDataPath and PdnResources.GetString("ColorPalettes.UserDataSubDirName") but there are several posts saying not to use PDNResources. :?

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

Hi there,

I've got a couple of ideas for some plugins (very early stages yet). I've plenty of experience on C# but little on Paint.net so I thought I would ask for a bit of help.

For my effect I would like to be able to use/specify palettes to go with them. Is there any way to access the paint.net palette system? As far as I can tell this is basically a user shortcut and not accessible via the object model. Is that correct?

I guess I could manually read/write to the Paint.NET User Files\Palettes folder as a fallback.

(Just checked and Paint.net refreshes the palette list when new files are added to this folder. Sweet!)

EDIT: Had a root around with PDNResources and discovered the Palette folder is localised. I can get it using PdnInfo.UserDataPath and PdnResources.GetString("ColorPalettes.UserDataSubDirName") but there are several posts saying not to use PDNResources. :?

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

I'd go for UserDataPath - I use it all the time.

I've already stated that you're not supposed to use the PdnInfo class like that. Don't recommend it to others.

The palette system is not available for plugins. There is no API or programmatic access to it.

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'd go for UserDataPath - I use it all the time.

I've already stated that you're not supposed to use the PdnInfo class like that. Don't recommend it to others.

The palette system is not available for plugins. There is no API or programmatic access to it.

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'd go for UserDataPath - I use it all the time.

I've already stated that you're not supposed to use the PdnInfo class like that. Don't recommend it to others.

The palette system is not available for plugins. There is no API or programmatic access to it.

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'd go for UserDataPath - I use it all the time.

I've already stated that you're not supposed to use the PdnInfo class like that. Don't recommend it to others.

The palette system is not available for plugins. There is no API or programmatic access to it.

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

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.

×
×
  • Create New...