ネストされたレイヤー構造を持つ XCD ファイルがあります。
image
front-layer
content-layer
content-layer-name-1
content-layer-name-2
content-layer-name-3
back-layer
でファイルを開き、、 、 as 、およびをimage = pdb.gimp_file_load(xcf_file, xcf_file)
取得できます。しかし、Gimp はリスト インデックスでサブレイヤーを取得できません。front-layer
content-layer
back-layer
image.layers[0]
image.layers[1]
image.layers[2]
content-layer
を使用できますpdb.gimp_image_get_layer_by_name(image, 'content-layer-name-3')
が、レイヤーの名前がわかりません。
を試してみpdb.gimp_item_get_children(image.layers[1])
ましたが、このメソッドはアイテムの子のリストを返しINT32ARRAY
、ID でアイテムを取得する方法が見つかりませんでした。
Gimp (2.8) で Python を使用してグループ レイヤーからサブレイヤーを取得するにはどうすればよいですか?