[CREATE] OpenRaster proposal: save currently selected layer

Boudewijn Rempt boud at valdyas.org
Sun Mar 25 02:52:25 PDT 2012


On Saturday 24 March 2012 Mar, Andrew Chadwick wrote:
> It would be helpful for users if the currently selected layer could be
> saved between sessions and restored when loading (see
> https://bugs.freedesktop.org/show_bug.cgi?id=37713 ). Let's support a
> new attribute on <layer/> to make this possible:
> 
>   <stack>
>     <layer name="sketch" x="0" y="0" src="data/layer001.png"/>
>     <layer name="colours" x="-512" y="-128" src="data/layer002.png"
>       selected="selected"/>
>   </stack>
> 
> A proposal for this up for review at
> http://www.freedesktop.org/wiki/Specifications/OpenRaster/Draft/LayerSelectionStatus
> . Comments welcome! (Reply-To: set; please use the CREATE list for feedback)
> 
> I've chosen W3C-style Boolean attribute notation for XML for this. Hope
> that's OK. As far as MyPaint is concerned the selected layer is the same
> thing as the layer currently active for editing (though it might be
> locked and thus not receive brushstrokes), and there is only one such
> layer. Does this proposal need to be extended to support multiple
> selection of layers and/or differing concepts of "active", or is what we
> have up right now sufficient? If it's insufficient, we could go with an
> enumerated type instead.

I think it's sufficient. I don't have a particular liking for the way these boolean attributes are specified, but I don't really object, and we can support this from krita as well.

In fact, one of the things on my todo list is to have such an attribute for our native file format too, as well as a way to mark layer groups as collapsed.

-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl


More information about the CREATE mailing list