Hi again, All!<br><br>There are some more troubles. This time they are with effect masks.<br><br>The problem is: we simply CAN'T add any selection with a selection<br>tool or paint something with a freehand tool on ANY MASK.<br>
<br>The reason is we use explicit conversion of the node to KisLayer* type<br>in these tools.<br><br>kis_tool_freehand.cc:282<br><br> if (!m_paintIncremental) {<br><br> KisIndirectPaintingSupport* layer;<br> if ((layer = dynamic_cast<KisIndirectPaintingSupport*>(currentNode().data()))) {<br>
// Hack for the painting of single-layered layers using indirect painting,<br> // because the group layer would not have a correctly synched cache (<br> // because of an optimization that would happen, having this layer as<br>
// projection).<br> KisLayerSP l = layer->layer();<br>...<br><br>kis_selection_tool_helper.h:33<br><br>class KRITAUI_EXPORT KisSelectionToolHelper<br>{<br>public:<br><br>...<br><br>private:<br> KisCanvas2* m_canvas;<br>
KisImageSP m_image;<br> KisLayerSP m_layer;<br> QString m_name;<br>};<br><br><br>I don't see any clear solution for this. And more than that, I'm afraid some <br>other tools can use the same conversion inside themselves.<br>
<br>The only solution i see is to derieve filter masks from<br>KisIndirectPaintingSupport and make some workaround with layer()<br>method...<br>Don't know really...<br><br>Do you have any ideas?<br clear="all"><br>-- <br>
Dmitry Kazakov<br>