Skip to content

Commit f53467d

Browse files
authored
Update zzstrokebevelimage.c
big changes in node connections.
1 parent 9d73c19 commit f53467d

1 file changed

Lines changed: 49 additions & 21 deletions

File tree

compile_zzstrokebevelimage_here/zzstrokebevelimage.c

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ property_double (lightness, _("Lightness of image file overlay"), 0.0)
185185
value_range (-100.0, 100.0)
186186

187187

188+
property_string (string, _("Graph1"), GEGLSYNTAXZONE)
189+
ui_meta ("role", "output-extent")
190+
191+
#define GEGLSYNTAXZONE \
192+
" id=1 clear aux=[ ref=1 ] ] "\
193+
188194

189195

190196
#else
@@ -219,6 +225,10 @@ typedef struct
219225
GeglNode *gaussian;
220226
GeglNode *cubismglow;
221227
GeglNode *move;
228+
GeglNode *ontop;
229+
GeglNode *nop2;
230+
GeglNode *crop;
231+
GeglNode *graph;
222232
GeglNode *output;
223233
} State;
224234

@@ -227,17 +237,23 @@ static void attach (GeglOperation *operation)
227237
{
228238
GeglNode *gegl = operation->node;
229239
GeglProperties *o = GEGL_PROPERTIES (operation);
230-
GeglNode *input, *output, *behind, *median, *cubismglow, *gaussian, *move, *nop, *opacity, *huelight, *opacitybevel, *bevel, *multiplyge, *disablebevel, *blurshadowimage, *atop, *layer, *stroke, *hardlightge, *shinygmge, *grainmergege, *colordodgege, *color;
240+
GeglNode *input, *output, *behind, *median, *cubismglow, *gaussian, *crop, *nop2, *move, *nop, *opacity, *huelight, *graph, *opacitybevel, *bevel, *multiplyge, *disablebevel, *blurshadowimage, *atop, *layer, *stroke, *hardlightge, *shinygmge, *grainmergege, *colordodgege, *color, *ontop;
231241

232242

233243
input = gegl_node_get_input_proxy (gegl, "input");
234244
output = gegl_node_get_output_proxy (gegl, "output");
235245

236246

247+
ontop = gegl_node_new_child (gegl,
248+
"operation", "gegl:src-in",
249+
NULL);
250+
251+
237252
color = gegl_node_new_child (gegl,
238-
"operation", "gegl:color-overlay",
253+
"operation", "gegl:color",
239254
NULL);
240255

256+
241257
median = gegl_node_new_child (gegl, "operation", "gegl:median-blur",
242258
"percentile", 100.0,
243259
"alpha-percentile", 100.0,
@@ -253,6 +269,11 @@ static void attach (GeglOperation *operation)
253269
"operation", "gegl:translate",
254270
NULL);
255271

272+
crop = gegl_node_new_child (gegl,
273+
"operation", "gegl:crop",
274+
NULL);
275+
276+
256277

257278
disablebevel = gegl_node_new_child (gegl,
258279
"operation", "gegl:dst",
@@ -264,14 +285,18 @@ static void attach (GeglOperation *operation)
264285

265286

266287

288+
nop2 = gegl_node_new_child (gegl,
289+
"operation", "gegl:nop",
290+
NULL);
291+
267292

268293
nop = gegl_node_new_child (gegl,
269294
"operation", "gegl:nop",
270295
NULL);
271296

272297

273298
behind = gegl_node_new_child (gegl,
274-
"operation", "gegl:dst-over",
299+
"operation", "gegl:src",
275300
NULL);
276301

277302

@@ -280,6 +305,10 @@ static void attach (GeglOperation *operation)
280305
NULL);
281306

282307

308+
graph = gegl_node_new_child (gegl,
309+
"operation", "gegl:gegl",
310+
NULL);
311+
283312
atop = gegl_node_new_child (gegl,
284313
"operation", "gegl:src-atop",
285314
NULL);
@@ -326,14 +355,7 @@ hardlightge = gegl_node_new_child (gegl,
326355
"operation", "gimp:layer-mode", "layer-mode", 44, "composite-mode", 0, "composite-space", 1, "blend-space", 0, NULL);
327356

328357

329-
gegl_node_link_many (input, behind, output, NULL);
330-
gegl_node_link_many (input, median, gaussian, move, opacity, color, atop, multiplyge, NULL);
331-
/*gegl_node_link (layer, NULL);*/
332-
gegl_node_link_many (atop, bevel, opacitybevel, NULL);
333358

334-
gegl_node_connect_from (multiplyge, "aux", bevel, "output");
335-
gegl_node_connect_from (atop, "aux", layer, "output");
336-
gegl_node_connect_from (behind, "aux", multiplyge, "output");
337359

338360

339361
gegl_operation_meta_redirect (operation, "tile_saturation", cubismglow, "tile-saturation");
@@ -382,6 +404,8 @@ hardlightge = gegl_node_new_child (gegl,
382404

383405
gegl_operation_meta_redirect (operation, "lightness", huelight, "lightness");
384406

407+
gegl_operation_meta_redirect (operation, "string", graph, "string");
408+
385409

386410

387411

@@ -413,6 +437,10 @@ hardlightge = gegl_node_new_child (gegl,
413437
state->median = median;
414438
state->gaussian = gaussian;
415439
state->move = move;
440+
state->ontop = ontop;
441+
state->nop2 = nop2;
442+
state->graph = graph;
443+
state->crop = crop;
416444
o->user_data = state;
417445
}
418446

@@ -441,33 +469,33 @@ update_graph (GeglOperation *operation)
441469
if (o->specialoutline)
442470
if (o->enableaura)
443471
{
444-
gegl_node_link_many (state->input, state->behind, state->output, NULL);
445-
gegl_node_link_many (state->median, state->cubismglow, state->gaussian, state->move, state->opacity, state->color, state->atop, multiplyge, NULL);
472+
gegl_node_link_many (state->input, state->median, state->cubismglow, state->gaussian, state->move, state->ontop, state->crop, state->atop, multiplyge, state->output, NULL);
446473
gegl_node_link_many (state->nop, state->layer, state->blurshadowimage, state->huelight, NULL);
447474
gegl_node_link_many (state->atop, state->bevel, state->opacitybevel, NULL);
448475
gegl_node_connect_from (multiplyge, "aux", state->opacitybevel, "output");
449476
gegl_node_connect_from (state->atop, "aux", state->huelight, "output");
450-
gegl_node_connect_from (state->behind, "aux", multiplyge, "output");
477+
gegl_node_link_many (state->color, state->nop2, state->opacity, NULL);
478+
gegl_node_connect_from (state->ontop, "aux", state->opacity, "output");
451479
}
452480
else
453481
{
454-
gegl_node_link_many (state->input, state->behind, state->output, NULL);
455-
gegl_node_link_many (state->median, state->gaussian, state->move, state->opacity, state->color, state->atop, multiplyge, NULL);
482+
gegl_node_link_many (state->input, state->median, state->gaussian, state->move, state->ontop, state->crop, state->atop, multiplyge, state->output, NULL);
456483
gegl_node_link_many (state->nop, state->layer, state->blurshadowimage, state->huelight, NULL);
457484
gegl_node_link_many (state->atop, state->bevel, state->opacitybevel, NULL);
458485
gegl_node_connect_from (multiplyge, "aux", state->opacitybevel, "output");
459486
gegl_node_connect_from (state->atop, "aux", state->huelight, "output");
460-
gegl_node_connect_from (state->behind, "aux", multiplyge, "output");
487+
gegl_node_link_many (state->color, state->nop2, state->opacity, NULL);
488+
gegl_node_connect_from (state->ontop, "aux", state->opacity, "output");
461489
}
462490
else
463491
{
464-
gegl_node_link_many (state->input, state->behind, state->output, NULL);
465-
gegl_node_link_many (state->median, state->gaussian, state->move, state->opacity, state->color, NULL);
466-
gegl_node_connect_from (state->behind, "aux", state->color, "output");
492+
gegl_node_link_many (state->input, state->median, state->gaussian, state->move, state->ontop, state->crop, state->output, NULL);
493+
gegl_node_link_many (state->color, state->nop2, state->opacity, NULL);
494+
gegl_node_connect_from (state->ontop, "aux", state->opacity, "output");
467495
}
468496
else
469497
{
470-
gegl_node_link_many (state->input, state->output, NULL);
498+
gegl_node_link_many (state->input, state->graph, state->output, NULL);
471499
}
472500
}
473501

@@ -488,7 +516,7 @@ gegl_op_class_init (GeglOpClass *klass)
488516
"title", _("Hidden Operation to bevel and image file overlay a stroke for GEGL Effects. GEGL Effects will not work at all without this hidden operation."),
489517
"categories", "hidden",
490518
"reference-hash", "33234v25str2ac",
491-
"description", _("Hidden Operation for testing on GEGL Effects"
519+
"description", _("Hidden Operation for GEGL Effects - This is a rough reimagination of Gimp's drop shadow filter with many new things and technical options that drop shadow was not capable of doing. GEGL Effects no longer calls Gimp's GEGL drop shadow filter. It uses this under the hood."
492520
""),
493521
NULL);
494522
}

0 commit comments

Comments
 (0)