-
Notifications
You must be signed in to change notification settings - Fork 43
/
blobi.py
executable file
·41 lines (33 loc) · 975 Bytes
/
blobi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
from gimpfu import *
def python_blobify(img, layer, blur) :
pdb.gimp_undo_push_group_start(img)
# Alpha to selection:
pdb.gimp_selection_layer_alpha(layer)
# Invert the selection:
pdb.gimp_selection_invert(img)
# Make a dropshadow from the inverted selection
pdb.script_fu_drop_shadow(img, layer, -3, -3, blur,
(0, 0, 0), 80.0, False)
# Clean up
pdb.gimp_selection_none(img)
pdb.gimp_undo_push_group_end(img)
register(
"python_fu_blobify",
"Create a 3-D effect",
"Create a blobby 3-D effect using inverse drop-shadow",
"Akkana Peck",
"Akkana Peck",
"2009",
"BlobiPy...",
"*",
[
(PF_IMAGE, "image", "Input image", None),
(PF_DRAWABLE, "drawable", "Input layer", None),
(PF_SPINNER, "blur", "Blur amount",
7, (0, 50, 1))
],
[],
python_blobify,
menu="<Image>/Filters/Light and Shadow")
main()