12-31-2024, 09:40 PM
(This post was last modified: 12-31-2024, 09:42 PM by origamifreak2.)
I have a question. The gimp_drawable_type() function on line 9 is returning 0 for jpegs, 1 for pngs, and 1 for layer groups. How would I tell the difference between a single layer in a png file and a layer group? I'm probably missing something very simple here.
Code:
# make sure drawable is a layer
drawable_type = pdb.gimp_drawable_type(drawable)
if drawable_type != 0 and drawable_type != 1:
pdb.gimp_message(drawable_type)
pdb.gimp_message("Please select a layer")
return