I tried to follow this tutorial: https://docs.krita.org/Channels When I try to set the blending mode for the layers individually through the drop-down menu at the top, it gets applied to all the layers. If I try to set the blending mode via the layer properties dialog, the "Copy Red", "Copy Green", and "Copy Blue" options are disabled. This problem also shows up when I use Krita from the Arch repositories (v3.3.2.1).
Weirdly enough, this bug seems to have been around for ages. What works is selecting the layer by clicking on it with the mouse and then selecting the blending mode in the combobox at the top of the layerbox. Moving along the layers with pgup and pgdn or using the properties dialog doesn't work.
Okay, so: There is a discrepancy between the when the layer is selected by pgup/pgdn and the settings dialog on the one hand, or by clicking in the layerbox on the other hand. In the first case, all the composite ops that are not in the layer's colormodel are disabled. In the second case, they are enabled. So, after selecting a grayscale layer with pgup in the layerbox, the warning label is shown. If you'd click anywhere in the layerbox, the warning label disappears. I would think that, if only in order to make that tutorial work, we should check the image's color model, not the layer's.
More notes: void KisCompositeOpComboBox::validate(const KoColorSpace *cs) was written to validate the composite ops for painting, not those in the layerbox. Validate is only called here: void KisPaintopBox::slotColorSpaceChanged(const KoColorSpace* colorSpace) { m_cmbCompositeOp->validate(colorSpace); }
Changing a layer with pgup causes three KisLayerBox::updateUI calls, and 3 KisPaintopBox::slotColorSpaceChanged calls: Validate KisCompositeOpComboBox(0x986fa30) "Grayscale/Alpha (8-bit integer/channel)" Validate KisCompositeOpComboBox(0x986fa30) "Grayscale/Alpha (8-bit integer/channel)" Validate KisCompositeOpComboBox(0xb836b90, name="cmbComposite") "RGB/Alpha (8-bit integer/channel)" Validate KisCompositeOpComboBox(0xb836b90, name="cmbComposite") "RGB/Alpha (8-bit integer/channel)" Validate KisCompositeOpComboBox(0xb836b90, name="cmbComposite") "RGB/Alpha (8-bit integer/channel)" Validate KisCompositeOpComboBox(0x986fa30) "Grayscale/Alpha (8-bit integer/channel)" The weird thing is that even if change KisLayerBox::updateUi to always call validate() with the image colorspace, the model is still filtered with the layer's colorspace.
Selecting a layer with the mouse only gives one call: Validate KisCompositeOpComboBox(0xb836b90, name="cmbComposite") "RGB/Alpha (8-bit integer/channel)" And doesn't cause anything to be validated in the paintopbox's composite op combobox, which then, of course isn't validated for the current layer's colorspace. So, are these models shared among instances of kis_cmb_compositeop?
Yes, they are. Sylvio, what were you thinking!
Git commit 01294ad178d6e7fac321579f182880f58c5a5d0b by Boudewijn Rempt. Committed on 03/01/2018 at 14:51. Pushed by rempt into branch 'master'. Do not share composite op models among composite op comboboxes It is perfectly valid for one composte op combobox to show a different set of valid composite ops than another, for instance if the image is rgb but the layer grayscale; a grayscale layer can be composited with rgb composite ops because it's converted to rgb beforehand. M +1 -1 libs/libqml/plugins/kritasketchplugin/models/CompositeOpModel.cpp M +19 -19 libs/ui/kis_composite_ops_model.cc M +13 -2 libs/ui/kis_composite_ops_model.h M +1 -11 plugins/dockers/defaultdockers/kis_layer_box.cpp M +0 -1 plugins/dockers/defaultdockers/kis_layer_box.h https://commits.kde.org/krita/01294ad178d6e7fac321579f182880f58c5a5d0b
Git commit 2172482f76979ae3c09b1eaf0734bb1918c677cb by Boudewijn Rempt. Committed on 03/01/2018 at 14:51. Pushed by rempt into branch 'krita/3.3'. Do not share composite op models among composite op comboboxes It is perfectly valid for one composte op combobox to show a different set of valid composite ops than another, for instance if the image is rgb but the layer grayscale; a grayscale layer can be composited with rgb composite ops because it's converted to rgb beforehand. M +19 -19 libs/ui/kis_composite_ops_model.cc M +13 -2 libs/ui/kis_composite_ops_model.h M +1 -11 plugins/dockers/defaultdockers/kis_layer_box.cpp M +0 -1 plugins/dockers/defaultdockers/kis_layer_box.h https://commits.kde.org/krita/2172482f76979ae3c09b1eaf0734bb1918c677cb