03-03-2024, 12:35 AM
This is because you used dashes (gimp-drawable-edit-clear) instead of underscores: (gimp_drawable_edit_clear). For Python you are therefore trying to subtract a variable called drawable from pdb.gimp. The Python doc is auto-generated and since the same text is used for script-fu and python-fu, there are things to adapt:
- all dashes become underscores
- object IDs in script-fu are plain objects in Python (so you get a gimp.Image object, not an integer)
- when there is no object instead of using the -1 ID you use None