Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Learn to create Python3 plugins
#9
(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:
Code:
garray = Gimp.ObjectArray()
garray.data.__add__([layer_group])
Gimp.get_pdb().run_procedure('gimp-image-set-selected-layers',
                                 [image, 1, garray ])
Or simply with:
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
Reply


Messages In This Thread
Learn to create Python3 plugins - by z-uo - 12-27-2021, 09:59 AM
RE: Learn to create Python3 plugins - by z-uo - 12-27-2021, 04:12 PM
RE: Learn to create Python3 plugins - by z-uo - 12-28-2021, 11:14 AM
RE: Learn to create Python3 plugins - by z-uo - 12-28-2021, 07:27 PM
RE: Learn to create Python3 plugins - by z-uo - 12-29-2021, 05:07 PM
RE: Learn to create Python3 plugins - by programmer_ceds - 12-29-2021, 06:13 PM
RE: Learn to create Python3 plugins - by z-uo - 12-30-2021, 10:16 AM
RE: Learn to create Python3 plugins - by z-uo - 12-30-2021, 04:56 PM
RE: Learn to create Python3 plugins - by z-uo - 12-30-2021, 05:54 PM
RE: Learn to create Python3 plugins - by z-uo - 12-31-2021, 08:40 AM
RE: Learn to create Python3 plugins - by z-uo - 01-02-2022, 10:37 AM

Forum Jump: