Created attachment 121605 [details] Test script Projection updates are actually all kinds of broken, apparently. Described in the summary is just a case that happened to completely ruin my workflow. This is a big deal for me, because it makes batch exports unreliable. Attached is a script that demonstrates the issue. It's a very simplified version of my actual export script, and is meant to be used with this document (too big to attach): https://akari.alienslab.net/krita-bug/cirno.kra STEPS TO REPRODUCE 1. $ PYTHONPATH=. kritarunner -s export_alphamaps cirno.kra 2. Grab a coffee, it's really slow. 3. Find the files `alphamap_normal.png` and `alphamap_defeated.png` in the working directory. 4. Open and compare them. OBSERVED RESULT The exported images are identical. EXPECTED RESULT The exported images must differ slightly. This is what `alphamap_defeated.png` is supposed to look like: https://akari.alienslab.net/krita-bug/alphamap_defeated_correct.png SOFTWARE/OS VERSIONS KDE Plasma Version: 5.16.2 KDE Frameworks Version: 5.59.0 Qt Version: 5.13.0 ADDITIONAL INFORMATION This particular problem is caused by the clone layer (root)->"alphamap"->"base mask group"->"variant mask", which refers to the group layer (root)->"variant", failing to update its contents when (root)->"variant"->"defeated" becomes visible, in spite of the refreshProjection() call. This problem occurs in the GUI as well, though the behavior seems to be more inconsistent.
The problem happens because layers "variant" "defeated" use Pass-through mode. Clone layers just copy the projection of the source layers, but pass-through nodes cannot have any projection by definition. I'll check if it is actually possible to implement such copying technically.
Git commit a0caf30f820581733b65b5b97d1641560531ad46 by Dmitry Kazakov. Committed on 20/09/2019 at 09:47. Pushed by dkazakov into branch 'master'. Strikethrough (and disable) a clone, whose source is a pass-through group Clone layers in Krita copy the projection of the source layer (and apply some effects to it, like offset, masks and etc). But pass-through group layers don't have any projection by definition, so clone layers cannot copy them. The only way to allow clone layers to copy pass-through groups is to copy their "projection plane" and "projection leaf" instead of projection device. But then there will be problems with masks, blending mode and other funny problems we never thought about. This patch just disables a clone layer that is connected to a pass-through group and notifies the user about it by striking-through its name. M +24 -4 libs/image/kis_projection_leaf.cpp M +9 -1 libs/image/kis_projection_leaf.h M +2 -2 libs/ui/kis_node_model.cpp M +1 -1 plugins/dockers/animation/timeline_frames_model.cpp https://invent.kde.org/kde/krita/commit/a0caf30f820581733b65b5b97d1641560531ad46
Git commit a2a1b600423be2b9ebf545d5bb89ede49c245748 by Dmitry Kazakov. Committed on 20/09/2019 at 09:47. Pushed by dkazakov into branch 'master'. Add user explanation about why the mask/clone is disabled The node tooltip will have an explanation, why the node has been disabled M +12 -0 libs/ui/kis_node_model.cpp M +5 -0 libs/ui/kis_node_model.h M +7 -0 plugins/dockers/layerdocker/NodeToolTip.cpp https://invent.kde.org/kde/krita/commit/a2a1b600423be2b9ebf545d5bb89ede49c245748
Okay, the user feedback is added. Now I'll downgrade this bug to a "wishlist". Perhaps one day we will implement cloning of pass-through nodes.
Git commit f78b6082f5c03d88fce513947f81901e6f31a1d4 by Dmitry Kazakov. Committed on 21/09/2019 at 10:07. Pushed by dkazakov into branch 'krita/4.2'. Strikethrough (and disable) a clone, whose source is a pass-through group Clone layers in Krita copy the projection of the source layer (and apply some effects to it, like offset, masks and etc). But pass-through group layers don't have any projection by definition, so clone layers cannot copy them. The only way to allow clone layers to copy pass-through groups is to copy their "projection plane" and "projection leaf" instead of projection device. But then there will be problems with masks, blending mode and other funny problems we never thought about. This patch just disables a clone layer that is connected to a pass-through group and notifies the user about it by striking-through its name. M +24 -4 libs/image/kis_projection_leaf.cpp M +9 -1 libs/image/kis_projection_leaf.h M +2 -2 libs/ui/kis_node_model.cpp M +1 -1 plugins/dockers/animation/timeline_frames_model.cpp https://invent.kde.org/kde/krita/commit/f78b6082f5c03d88fce513947f81901e6f31a1d4