SUMMARY When using the Python Scripting to modify parameters for a Fill Layer, the fill layer does not update after calling refreshProjection(). STEPS TO REPRODUCE 1. Create a new document. 2. Create a new Fill Layer. Choose any color except green (because my example script will try to make it green) 3. Run the following script: ###### SCRIPT START ###### from krita import * import xml.etree.ElementTree as ET activeDoc = Krita.instance().activeDocument() node = activeDoc.nodeByName("Fill Layer 1") config = node.filterConfig() properties = config.properties() xmlObj = ET.fromstring(properties["color"]) xmlObj[0].set("r", "0.00") xmlObj[0].set("g", "1.00") xmlObj[0].set("b", "0.00") result = ET.tostring(xmlObj, encoding="unicode") properties["color"] = result config.setProperty("color", properties["color"]) node.setGenerator("color", config) activeDoc.refreshProjection() ###### SCRIPT END ###### OBSERVED RESULT The Fill Layer remains the old color. It will update correctly if you right click the layer and go to "Properties". EXPECTED RESULT The Fill Layer color change should be reflected on the canvas. SOFTWARE/OS VERSIONS Windows: 10 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: 5.12.12 ADDITIONAL INFORMATION I have reproduced this issue on 2 different machines: - Core i9 Desktop on Windows 10 - Core i7 Wacom MobileStudio Pro on Windows 10
I can confirm the issue. I also see that the call to setGenerator returns True, so that is not the problem.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1277
*** Bug 447892 has been marked as a duplicate of this bug. ***
Git commit 60141f1b8e77ba24e927075a174aba9959a10175 by L. E. Segovia, on behalf of Halla Rempt. Committed on 04/01/2022 at 16:44. Pushed by lsegovia into branch 'master'. Update the FilLayer when the config is set from Python When setting the filter from FillLayer, filter()->compareTo(filterConfig.constData()) returns true, so the layer never gets updated. M +5 -4 libs/image/generator/kis_generator_layer.cpp M +2 -2 libs/image/generator/kis_generator_layer.h M +2 -2 libs/image/kis_adjustment_layer.cc M +1 -1 libs/image/kis_adjustment_layer.h M +2 -2 libs/image/kis_filter_mask.cpp M +1 -1 libs/image/kis_filter_mask.h M +1 -1 libs/image/kis_node_filter_interface.cpp M +6 -1 libs/image/kis_node_filter_interface.h M +2 -3 libs/libkis/FillLayer.cpp https://invent.kde.org/graphics/krita/commit/60141f1b8e77ba24e927075a174aba9959a10175
Git commit 8eff6eed1cba30339f23c53001f750aeea49d5e4 by L. E. Segovia, on behalf of Halla Rempt. Committed on 04/01/2022 at 16:58. Pushed by lsegovia into branch 'krita/5.0'. Update the FilLayer when the config is set from Python When setting the filter from FillLayer, filter()->compareTo(filterConfig.constData()) returns true, so the layer never gets updated. (cherry picked from commit 60141f1b8e77ba24e927075a174aba9959a10175) M +5 -4 libs/image/generator/kis_generator_layer.cpp M +2 -2 libs/image/generator/kis_generator_layer.h M +2 -2 libs/image/kis_adjustment_layer.cc M +1 -1 libs/image/kis_adjustment_layer.h M +2 -2 libs/image/kis_filter_mask.cpp M +1 -1 libs/image/kis_filter_mask.h M +1 -1 libs/image/kis_node_filter_interface.cpp M +6 -1 libs/image/kis_node_filter_interface.h M +2 -3 libs/libkis/FillLayer.cpp https://invent.kde.org/graphics/krita/commit/8eff6eed1cba30339f23c53001f750aeea49d5e4
Git commit ccf08a00e75b5f9213f7919eb04660dc6f4d0cb9 by L. E. Segovia, on behalf of Halla Rempt. Committed on 04/01/2022 at 16:58. Pushed by lsegovia into branch 'krita/5.0.0'. Update the FilLayer when the config is set from Python When setting the filter from FillLayer, filter()->compareTo(filterConfig.constData()) returns true, so the layer never gets updated. (cherry picked from commit 60141f1b8e77ba24e927075a174aba9959a10175) M +5 -4 libs/image/generator/kis_generator_layer.cpp M +2 -2 libs/image/generator/kis_generator_layer.h M +2 -2 libs/image/kis_adjustment_layer.cc M +1 -1 libs/image/kis_adjustment_layer.h M +2 -2 libs/image/kis_filter_mask.cpp M +1 -1 libs/image/kis_filter_mask.h M +1 -1 libs/image/kis_node_filter_interface.cpp M +6 -1 libs/image/kis_node_filter_interface.h M +2 -3 libs/libkis/FillLayer.cpp https://invent.kde.org/graphics/krita/commit/ccf08a00e75b5f9213f7919eb04660dc6f4d0cb9