Jump to content

Plugin Read Access to Other Layers


MJW
 Share

Recommended Posts

I'm sure I've asked for this before somewhere, but one feature I think would be very useful is to allow plugins the ability to know about and read other layers. Just a few simple function calls to tell a plugin how many layers there are, which layer is currently active, and, of course, access to the pixels in the other layers. Knowing each layer's current blend mode would also be useful.  Plugins shouldn't be able to modify the other layers, just read their pixel data. This would allow, for example, displacement maps. Some current plugins use the clipboard, but in my opinion, that's an inconvenient and awkward solution.

Link to comment
Share on other sites

I tried to figure out why you want this and maybe it's just me but I don't see a need for this. I am quite happy with the way it works right now and don't see the need to make this program more like Photoshop. (IMHO)

 

                                                              http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery

Link to comment
Share on other sites

For example, suppose you want to produce a watercolor effect by jittering the image according to a paper texture. Or you want to reflection map the image. There are lots of uses. Nothing would change for plugin writers who didn't use the feature.

Edited by MJW
Link to comment
Share on other sites

Rick (paint.net developer) has a very specific set of access permissions/limitations in place for plugins.  Currently they have access to the active layer only.  I don't see this changing any time soon.

 

For a more complete list of what plugins can and cannot do See Here

Link to comment
Share on other sites

I don't understand the reason for the rule. I can certainly understand a rule that plugins can only modify the active layer. I don't see the harm that would come from plugins reading the other layers, and I can see a number of advantages. Some very clever plugins have been written that use the clipboard to get the other image data, but that seems to me to be a rather ugly kludge. For one thing, the other image layers are the same dimension. The clipboard isn't. In most cases, the data in the clipboard is gotten by selecting and copying another layer. What's the point of adding an inconvenient extra step?

Edited by MJW
Link to comment
Share on other sites

I didn't say it was a rule. The lack of access to other layers is deeply ingrained in the heart of paint.net. No tool can draw on two layers simultaneously for example.

Imagine each layer is placed in a box for its own security. We can let a plugin loose inside any box to modify the contents freely. The other boxes remain closed and immune to the rampaging plugins evil deeds.

I know your scenario is a read-only request, but this would still require an opening of each 'box'.

Link to comment
Share on other sites

The first two lines make perfect sense: I agree plugins shouldn't be allowed to modify other layers; it would be confusing. Users expect tools to act on the active layer. I disagree with the final line. Allowing a plugin to use the contents of another layer to modify the active layer wouldn't be confusing, it wouldn't violate a user's expectation, and it would be useful. I don't think users expect that only the current layer can affect the output of a plugin; in fact, I know they don't, since the content of the clipboard is allowed to affect the output. As I've mentioned, there are several current plugins that would be much improved if they could use the image in another layer, such as one that does reflection mapping. How is it less reasonable to use another layer for the displacement map than to use data from the clipboard?

Edited by MJW
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...