Thu Jun 18, 2020 8:43 pm
Fri Jun 19, 2020 12:06 am
Fri Jun 19, 2020 1:54 am
Fri Jun 19, 2020 2:51 am
Fri Jun 19, 2020 4:05 am
MareroQ wrote:Hi Pocholo.
... Layerfx.py contains about 6570 lines of code, but a significant part is related only to the preview function (using gtk, which slows down the execution). It is possible that it will be easier to parse the layerfx.scm code (this is only about 1485 lines of code)....
Fri Jun 19, 2020 4:22 am
dinasset wrote:MareroQ wrote:Hi Pocholo.
... Layerfx.py contains about 6570 lines of code, but a significant part is related only to the preview function (using gtk, which slows down the execution). It is possible that it will be easier to parse the layerfx.scm code (this is only about 1485 lines of code)....
...I'm sure that -if Ofnuts will spend a bit of his summer vacation on this subject- his python version of layerfx would be less of 1000 lines of code.
Fri Jun 19, 2020 5:32 am
Fri Jun 19, 2020 7:02 am
Fri Jun 19, 2020 7:05 am
rich2005 wrote:Now why would anyone think that
Fri Jun 19, 2020 7:09 am
ofnuts wrote:rich2005 wrote:Now why would anyone think that
Node-based editing at its finestAnd if you draw a chicken you get your text as rolling 3D credits, Star-wars style.
Fri Jun 19, 2020 7:50 am
#!/usr/bin/env python
# author: Pocholo
# date: 6/6/20
# Comments directed to http://gimpchat.com
# Installation:
# This script should be placed in the user plugin folder
# Copyright (C)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from gimpfu import *
def pm_incredible_hulk_text(customtext, font, fontsize, textcolor):
#Create image
img = pdb.gimp_image_new(1, 1, RGB_IMAGE)
pdb.gimp_context_push()
#Create the text
pdb.gimp_context_set_foreground(textcolor)
layer = pdb.gimp_text_fontname(img, None, 0, 0, customtext, 65,
TRUE, fontsize, PIXELS, font)
pdb.gimp_text_layer_set_letter_spacing(layer, 30)
pdb.gimp_text_layer_set_justification(layer, 2)
#Resize image
img.resize(layer.width, layer.height, 0, 0)
#Create background
backlayer = pdb.gimp_layer_new(img, layer.width, layer.height, RGB_IMAGE, "Background", 100, LAYER_MODE_NORMAL)
pdb.gimp_image_add_layer(img, backlayer, 1)
pdb.gimp_context_set_gradient("Greens")
pdb.gimp_drawable_edit_gradient_fill(backlayer, 0, 0, TRUE, 3, 0.20, TRUE, 800, 0, 800, 900)
#Text drop shadow
pdb.python_layerfx_drop_shadow(img, layer,
(0, 0, 0), #color
0.75, #opacity
1, #contou
0, #noise
3, #mode for multiply
15, #spread
20, #size
120, #offset_angle
20, #offset_distance
TRUE, #knockout
FALSE) #merge
#Text inner shadow
pdb.python_layerfx_inner_shadow(img, layer,
(0, 0, 0), #color
75, #opacity
1, #contou
0, #noise
3, #mode for multiply
1, #source
0, #choke
45, #size
120, #offset_angle
5, #offset_distance
FALSE) #merge
#Text outer glow
pdb.python_layerfx_outer_glow(img, layer,
(14, 34, 0), #color
100, #opacity
0, #contou
0, #noise
4, #mode
8, #spread
14, #size
TRUE, #knockout
FALSE) #merge
pdb.python_layerfx_bevel_emboss(img, layer,
1, #style inner bevel
65, #depth
0, #direction
48, #size
4, #soften
120, #angle
65, #altitude
5, #gloss_contour
"White", #highlight_color
10, #highlight_mode lighten only
40, #highlight_opacity
"Black", #shadow_color
17, #shadow_mode burn
55, #shadow_opacity
6, #surface_contour
TRUE, #use_texture
"Dried mud", #pattern
150, #scale
-30, #tex_depth
TRUE, #invert
FALSE) #merge
pdb.python_layerfx_satin(img, layer,
(27, 92, 26), #color
90, #opacity
3, #mode MULTIPLY
19, #offset_angle
14, #offset_distance
60, #size
3, #contou
TRUE, #invert
FALSE) #merge
pdb.python_layerfx_color_overlay(img, layer,
(44, 63, 2), #color
100, #opacity
18, #mode hard light
FALSE) #merge
pdb.gimp_context_set_foreground((0, 255, 0))
pdb.gimp_context_set_background((255, 255, 255))
pdb.python_layerfx_gradient_overlay(img, layer,
"FG to BG (RGB)", #gradient
0, #gradient_type linear
0, #repeat none
FALSE, #reverse
85, #opacity
21, #mode grain merge
0, #center_x
0, #center_y
90, #angle
200, #width
FALSE) #merge
pdb.python_layerfx_pattern_overlay(img, layer,
"Dried mud", #pattern
100, #opacity
21, #mode grain merge
150, #scale
0, #interpolation
FALSE) #merge
gimp.Display(img)
pdb.gimp_context_pop()
register(
"pm_incredible_hulk_text",
"Creates a muscles text",
"Creates a Hulk text",
"Pocholo",
"Pocholo",
"2020",
"The incredible Hulk text",
"",
[
(PF_STRING, "customtext", "Text string", 'HULK'),
(PF_FONT, "font", "Font face", "Berlin Sans FB Bold"),
(PF_SPINNER, "fontsize", "Font size", 300, (100, 500, 1)),
(PF_COLOR, "textcolor", "Text color", (1, 48, 1)),
],
[],
pm_incredible_hulk_text, menu="<Image>/Python-Fu/The incredible Hulk text")
main()
Fri Jun 19, 2020 8:50 am
Wed Aug 12, 2020 7:23 am
Wed Aug 12, 2020 8:00 am