I have this code, which is working fine:
from krita import *
application = Krita.instance()
currentDoc = application.activeDocument()
layer2 = currentDoc.createFileLayer(“Layer2”,“C:\Dev\Logo\Screenshot.png”,“None”)
currentDoc.rootNode().addChildNode(layer2, None)
groupLayer = currentDoc.createGroupLayer(“Group3”)
currentDoc.rootNode().addChildNode(groupLayer, None)
currentDoc.refreshProjection()
Now I would like to add layer2 as child of groupLayer, but I can’t find any method, which can do that…
This code doesn’t do nothing:
groupLayer.addChildNode(layer2,None)
Any help much appreciated!