12-29-2021, 06:13 PM
(12-29-2021, 05:07 PM)z-uo Wrote: Now I try to do an unnecessary thing: I want that at the end a particular layer is the selected(that is the group in witch contains other two created layers created by the plugin) so I try with:
Or simply with:Code:
garray = Gimp.ObjectArray()
garray.data.__add__([layer_group])
Gimp.get_pdb().run_procedure('gimp-image-set-selected-layers',
[image, 1, garray ])
Code:
Gimp.get_pdb().run_procedure('gimp-image-set-selected-layers',
[image, 1, [layer_group] ])
But it Crashes (the entire GIMP crashes).
The full code can be found here.
How can I select a specific layer by code?
Look at lines 699 to 720 in this script:
http://programmer97.byethost10.com/Files...Guides.zip