Jump to content

Alter Layer Properties in Plugins


Recommended Posts

(I made this account just to ask this ... I read the FAQ and all the rules and searched and searched for this but I've found nothing aside from this guy making a currently completely unanswered feature request regarding part of my larger question)

 

I was sprite sheeting, and realized how immensely easier (and less prone to err) my life would be if I could control multiple layers at once, specifically in the form of making all layers visible/invisible. paint.net doesn't allow for multiple layer selection like a Photoshop, which is fine (I assume this is a design choice), but this spurred me to enter plugin development (I've touched on C# before, but I'm mainly a C/Java/etc. dev.). I thought adding a simple functionality to toggle or XOR invert all the layer's boolean Visible property would be exceedingly simple and a great first plugin. However, I went through BoltBait's CodeLab tutorials, and this didn't seem to be the case.

 

I've read through this list of what is and isn't possible when designing plugins and the first bullet is that

  • Effects can only access the current layer.

However, this still seems like a relatively trivial task and now I've spent hours dedicated to this simple trick of altering the visibility properties of multiple layers and thought I'd ask proper.

 

Is there any way to access the properties of all layers in code?

 

(or any other solution to this problem, really)

 

Thank you, I appreciate any feedback.

Link to comment
Share on other sites

Though I, too, wish plugins had more (read) access to other layers, and probably agree that it would be desirable for plugins to be able to temporarily -- only while the plugin is active -- change the visibility of other layers, I think your chance of getting this feature are very nearly zero. I don't believe it's a matter of implementation difficulty. Access to other layers seems to be deemed contrary to PDN plugin philosophy.

Link to comment
Share on other sites

  • Effects can only access the current layer.
...

 

Is there any way to access the properties of all layers in code?

You've answered your own question :D

Plugins operate in a narrow and very specifically designed framework. They get to operate on ONE layer and WITHIN any active selection on that layer. This is not likely to change.

Link to comment
Share on other sites

Though I think his chance of getting it is nil, I don't think it's quite that clear that what Gunnar is asking for is forbidden. If operate means modify, than he's not asking to operate on pixels outside the active layer's selection. Operate surely can't mean  "use in any manner," since plugins can obviously use pixels outside the current selection to affect the results within the selection. They can also use external data stored in the clipboard.

Link to comment
Share on other sites

... I don't think it's quite that clear that what Gunnar is asking for is forbidden.

Disagree. I think it IS forbidden. By toggling the layer properties you're affecting the layer.

I think you're arguing semantics to say the pixels haven't changed.

More info on plugin rules: http://forums.getpaint.net/index.php?/topic/13129-rules-for-plugins-that-are-published-on-this-forum/

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...