Created attachment 152004 [details] A krita file that can be used for example SUMMARY The following Python API function don't work properly: - save() - projectionPixelData() - thumbnail() If layer have a layer style, layer style is not taken in account when saving/return data If layer have a filter mask, filter mask is properly taken in account STEPS TO REPRODUCE 1. Create a document with a paint layer, draw something 2. Add a filter mask (gaussian blur for example) 3. Add a layer style (a stroke for example) 4. In scripter, execute the following code: ``` from krita import * from PyQt5.Qt import * def toQImage(layerNode): rect = layerNode.bounds() return QImage(layerNode.projectionPixelData(rect.left(), rect.top(), rect.width(), rect.height()), rect.width(), rect.height(), QImage.Format_ARGB32) ad=Krita.instance().activeDocument() ad.refreshProjection() n=ad.activeNode() options=InfoObject() n.save("/home/grum/test_layer.png", 72, 72, options, QRect()) lbl=QLabel() lbl.setPixmap(QPixmap.fromImage(toQImage(n))) layout=QVBoxLayout() layout.addWidget(lbl) dlg=QDialog() dlg.setLayout(layout) dlg.exec() ``` OBSERVED RESULT - On exported PNG file (save method), the filter mask is applied but not the layer style - On displayed image (projectionPixelData method), the filter mask is applied but not the layer style EXPECTED RESULT Layer style should be applied as for filter mask Note: pixelData() method doesn't take in account layer style and filters mask ==> it's normal and this method shouldn't be impacted by bug fix SOFTWARE/OS VERSIONS Tested on Linux appimage, on version 4.4.3, 4.4.8, 5.1.0 ==> problem is here from a while
I'm wondering if it's not related to this one: https://bugs.kde.org/show_bug.cgi?id=363064 For clone layer, layer style are not taken in account. Then maybe the problem is not on API side, but deeper in how projection is calculated? Grum999
That's because Node::save doesn't copy the layerstyle and put on the new node that was cloned from the original node.