|
GimpChat Member |
|
Joined: Oct 31, 2020 Posts: 1437
|
All it needs are sliders now. Its name may or may not change. When developing plugins it makes sense to add all the sliders last. Attachment:
pirates_gold.png [ 409.26 KiB | Viewed 860 times ]
Here's an example of the GEGL nodes work. This might help future devs by breaking down the code.. This is where we list all GEGL nodes that are going to be used and colors that GEGL will use. These do NOT have to be listed in proper order. GeglNode *gegl = operation->node; GeglNode *input, *sharpbevel, *metallic, *bloom, *crop, *over, *idref, *fix, *nr, *inlow, *noise, *opacity, *output; GeglColor *bakedcolor = gegl_color_new ("#fc72fd"); GeglColor *bakedcolor2 = gegl_color_new ("#f8f2d4");
This is where the GEGL nodes are defined. These GEGL nodes have many embedded parameters including baked in colors via "bakedcolor1 and bakedcolor2. Metalic and Sharp Bevel are special GEGL nodes made by me and they are technically just a combination of simpler GEGL nodes. sharpbevel = gegl_node_new_child (gegl, "operation", "lb:sharpbevel", "bevelcolorpolicy", TRUE, "color", bakedcolor, "bevelcontrol", 1.5, "blendmode", 0, NULL);
metallic = gegl_node_new_child (gegl, "operation", "gegl:metallic", "guichange", 1, "liquid", 0.3, "solar1", 5.2, "solar2", 5.6, "solar3", 2.1, "light", 0.0, "smooth", 2, "color", bakedcolor2, "opacity", 0.9, "blend", 3, NULL);
bloom = gegl_node_new_child (gegl, "operation", "gegl:bloom", "strength", 29.0, "radius", 8.0, NULL);
crop = gegl_node_new_child (gegl, "operation", "gegl:crop", NULL);
over = gegl_node_new_child (gegl, "operation", "gegl:over", NULL);
idref = gegl_node_new_child (gegl, "operation", "gegl:nop", NULL);
fix = gegl_node_new_child (gegl, "operation", "gegl:median-blur", "radius", 0, NULL);
nr = gegl_node_new_child (gegl, "operation", "gegl:noise-reduction", "iterations", 2, NULL);
inlow = gegl_node_new_child (gegl, "operation", "gegl:levels", "in-low", 0.075, NULL);
noise = gegl_node_new_child (gegl, "operation", "gegl:noise-rgb", "correlated", FALSE, "independent", FALSE, "linear", FALSE, "gaussian", FALSE, "red", 0.80, "green", 0.20, "blue", 0.20, NULL);
opacity = gegl_node_new_child (gegl, "operation", "gegl:opacity", "value", 0.27, NULL);
This is the GEGL Graph. Nodes are replaced in order from first node applied to last node applied. SharpBevel is the first node and fix is the last. Fix is a median blur at zero radius meant to fix an opacity bug. idref is a gegl:nop (no operation) that puts a copy of the image inside a over blend mode. Over blend mode in GEGL is the same thing as a "normal" blend mode in Gimp. gegl_node_link_many (input, sharpbevel, crop, metallic, idref, over, bloom, inlow, fix, output, NULL); gegl_node_link_many (idref, noise, opacity, nr, NULL); gegl_node_connect_from (over, "aux", nr, "output");
|
|