It is currently Wed Jun 19, 2024 2:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: GEGL Ring Bevel Plugin Download
PostPosted: Thu Oct 12, 2023 10:56 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
This plugin is now complete and available for download here.
https://github.com/LinuxBeaver/Gimp_Rin ... imp_Plugin


Location to put binaries

Windows

C:\Users\(USERNAME)\AppData\Local\gegl-0.4\plug-ins

Linux
/home/(USERNAME)/.local/share/gegl-0.4/plug-ins

Linux (Flatpak includes Chromebook)
/home/(USERNAME)/.var/app/org.gimp.GIMP/data/gegl-0.4/plug-ins

Then restart Gimp and go to GEGL Operations and look for "Ring Bevel" if you have Gimp 2.99.16+ you will see it in filters>text styling (2.10 doesn't have that menu list) But this plugin works on both 2.10 and 2.99


The full page below shows the developmental progress of this plugin documented from conception to release. This is me documenting step by step on how I made this plugin. It is meant to educate future GEGL devs. If you want to discuss the plugin normally just head over to page two.
--

A popular script fu "Emboss and Bevel" has a mode called Ring Bevel. Now a GEGL counterpart is being developed to match its abilities. This thread is meant to show the development of the new GEGL Ring Bevel plugin. So we can all learn what is going on and hopefully get someone other them me to make a GEGL plugin by sharing my knowledge as much as possible.

Image Preview of Ring Bevel
Attachment:
preview_ring_bevel.png
preview_ring_bevel.png [ 312.25 KiB | Viewed 5561 times ]



Graph of Ring Bevel - if you paste this syntax in Gimp's GEGL graph filter you can test it without installing the plugin that is still in development.

Requires these plugins for syntax (and probably final filter) to work
https://github.com/LinuxBeaver/GEGL-Cus ... l/releases
https://github.com/LinuxBeaver/GEGL-SSG ... /releases/

levels out-low=0.00
id=1
dst-out aux=[ ref=1

median-blur radius=5 alpha-percentile=0
ssg radius=0 stroke=7
ssg radius=0 stroke=7
ssg radius=0 stroke=7
ssg radius=0 stroke=7

median-blur radius=0

]
custom-bevel depth=4 gaus=1
dst-over aux=[ ref=1 custom-bevel depth=1 gaus=1  ]





Node Definitions of Ring Bevel inside the .c file (THIS MAY CHANGE IN THE FUTURE)

  state->bevel = gegl_node_new_child (gegl,
                                  "operation", "gegl:custom-bevel", "depth", 4.0, "gaus", 1.0,
                                  NULL);


  state->bevel2 = gegl_node_new_child (gegl,
                                  "operation", "gegl:custom-bevel", "depth", 1.0, "gaus", 1.0,
                                  NULL);

  state->erase = gegl_node_new_child (gegl,
                                  "operation", "gegl:dst-out",
                                  NULL);

  state->behind = gegl_node_new_child (gegl,
                                  "operation", "gegl:dst-over",
                                  NULL);

  state->idref = gegl_node_new_child (gegl,
                                  "operation", "gegl:nop",
                                  NULL);

  state->nop1 = gegl_node_new_child (gegl,
                                  "operation", "gegl:nop",
                                  NULL);

  state->nop2 = gegl_node_new_child (gegl,
                                  "operation", "gegl:nop",
                                  NULL);

  state->nop3 = gegl_node_new_child (gegl,
                                  "operation", "gegl:nop",
                                  NULL);

  state->nop4 = gegl_node_new_child (gegl,
                                  "operation", "gegl:nop",
                                  NULL);

  state->fix = gegl_node_new_child (gegl,
                                  "operation", "gegl:median-blur", "radius", 0,
                                  NULL);

  state->levels = gegl_node_new_child (gegl,
                                  "operation", "gegl:levels",
                                  NULL);

  state->s1 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);

  state->s2 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);

  state->s3 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);

  state->s4 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);


  state->median = gegl_node_new_child (gegl,
                                  "operation", "gegl:median-blur", "radius", 5, "alpha-percentile", 0.0, 
                                  NULL);



Node Connections of Ring Bevel inside the .c file (THIS MAY CHANGE IN THE FUTURE)

  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, ringnumber, ringnumber2, ringnumber3, ringnumber4, state->fix,   NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");


Notice how the nodes named "ringnumber" in NODE CONNECTIONS doesn't have a state-> in front of it? That is because they are special node that allows users to choose 1 to 4 rings here. Remember in NODE DEFINITIONS s1, s2, s3, and s4, are ssg's AKA outlines and nop1, nop2, nop3, and nop4, are the DO NOTHING OPERATIONS. The user choices between one to four rings here like this..

If if the ring number is on one it will be 3 gegl:nop's (no operation) and 1 SSG
If the ring number is on two it will be 2 gegl:nop's (no operation) and 2 SSG's
If the ring number is one three it will be on 1 gegl:nop (no operation) 3 SSG's
If the ring number is on four it will be on 0 no operations and four SSGs.


This will allow a drop down list of 1 to 4 rings.


Lets see image previews of three and two rings by removing SSG's from the graph.

3 RINGS
Attachment:
pasted_image266.png
pasted_image266.png [ 236.39 KiB | Viewed 5561 times ]


2 RINGS
Attachment:
2.png
2.png [ 208.96 KiB | Viewed 5561 times ]


I will continue updating this thread with more information as the plugin develops and for now on I will do a real time step by step documentation of every plugin I develop.

btw this is either my 59th of 60th plugin depending on rather this comes first or my other Edge Only Bevel.


Last edited by contrast_ on Fri Oct 13, 2023 2:23 pm, edited 4 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Thu Oct 12, 2023 11:02 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Below is the incomplete source code of Ringed Bevel. It will not compile and it is far from finished. I'm just doing this so everyone can study the code. By the way, Once this filter is complete I will update the beginning of the thread, edit the first post and link the download on Github

/* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
*
* Copyright 2006 Øyvind Kolås <pippin@gimp.org>
* 2023 Beaver, Ringed Bevel
You can test plugin without installing by pasting this syntax into Gimp's GEGL graph (This graph requires other plugins 'ssg' and 'custom-bevel' this filter ships with those two plugins)

levels out-low=0.00
id=1
dst-out aux=[ ref=1

median-blur radius=5 alpha-percentile=0
ssg radius=0 stroke=7
ssg radius=0 stroke=7
ssg radius=0 stroke=7
ssg radius=0 stroke=7

median-blur radius=0
]
custom-bevel depth=4 gaus=1
dst-over aux=[ ref=1 custom-bevel depth=1 gaus=1  ]
*/


#include "config.h"
#include <glib/gi18n-lib.h>

#ifdef GEGL_PROPERTIES

property_boolean(advanced_options, _("Detailed options"), FALSE)
   description  (_("Show all settings for this plugin."))


enum_start (ring_time)
  enum_value (ONE_RING, "onering",
              N_("One Ring"))
  enum_value (TWO_RINGS,      "tworings",
              N_("Two Rings"))
  enum_value (THREE_RINGS,      "threerings",
              N_("Three Rings"))
  enum_value (FOUR_RINGS,      "fourrings",
              N_("Four Rings"))
enum_end (ringtime)
/* This ENUM list has a unique name to avoid conflicts with other plugins or Gimp filters*/

property_enum (rings, _("Amount of Rings"),
    ringtime, ring_time,
    FOUR_RINGS)
   description  (_("Choose the amount of rings 1-4"))


property_int  (size, _("Size of the Bevel"), 3)
  value_range (1, 9)
  ui_range    (1, 9)
  ui_meta     ("unit", "pixel-distance")
  description (_("Median Radius to control the size of the bevel"))


property_double (azimuth, _("Azimuth"), 67.0)
    description (_("Light angle (degrees)"))
    value_range (20, 90)
    ui_meta ("unit", "degree")
    ui_meta ("direction", "ccw")

property_double (elevation, _("Elevation"), 35.0)
    description (_("Elevation angle (degrees). This appears to rotate the brightest pixels."))
    value_range (7, 70)
    ui_meta ("unit", "degree")

property_int (depth, _("Depth and or detail"), 24)
    description (_("Brings out depth and or detail of the bevel depending on the blend mode"))
    value_range (8, 45)


property_double (sharpen, _("Sharpen Radius"), 0.0)
    description (_("Unsharp mask radius that helps the bevel apper to have depth and structure to it."))
    value_range (0, 5)
    ui_range (0, 5)
   ui_meta ("visible", "advanced_options")




#else

#define GEGL_OP_META
#define GEGL_OP_NAME     ringbevel
#define GEGL_OP_C_SOURCE ringbevel.c

#include "gegl-op.h"

typedef struct
{
GeglNode *input;
GeglNode *levels;
GeglNode *erase;
GeglNode *s1;
GeglNode *s2;
GeglNode *s3;
GeglNode *s4;   
GeglNode *bevel;
GeglNode *behind;
GeglNode *median;
GeglNode *bevel2;
GeglNode *over;
GeglNode *idref;
GeglNode *fix;
GeglNode *output;
}State;


static void attach (GeglOperation *operation)
{
  GeglNode *gegl = operation->node;
  GeglProperties *o = GEGL_PROPERTIES (operation);

  State *state = o->user_data = g_malloc0 (sizeof (State));


  state->input    = gegl_node_get_input_proxy (gegl, "input");
  state->output   = gegl_node_get_output_proxy (gegl, "output");


  state->bevel = gegl_node_new_child (gegl,
                                  "operation", "gegl:custom-bevel", "depth", 4.0, "gaus", 1.0,
                                  NULL);


  state->bevel2 = gegl_node_new_child (gegl,
                                  "operation", "gegl:custom-bevel", "depth", 1.0, "gaus", 1.0,
                                  NULL);

  state->erase = gegl_node_new_child (gegl,
                                  "operation", "gegl:dst-out",
                                  NULL);

  state->behind = gegl_node_new_child (gegl,
                                  "operation", "gegl:dst-over",
                                  NULL);

  state->idref = gegl_node_new_child (gegl,
                                  "operation", "gegl:nop",
                                  NULL);

  state->fix = gegl_node_new_child (gegl,
                                  "operation", "gegl:median-blur", "radius", 0,
                                  NULL);

  state->levels = gegl_node_new_child (gegl,
                                  "operation", "gegl:levels",
                                  NULL);

  state->s1 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);

  state->s2 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);

  state->s3 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);

  state->s4 = gegl_node_new_child (gegl,
                                  "operation", "gegl:ssg", "radius", 0, "stroke", 7.0, 
                                  NULL);


  state->median = gegl_node_new_child (gegl,
                                  "operation", "gegl:median-blur", "radius", 5, "alpha-percentile", 0.0, 
                                  NULL);


static void update_graph (GeglOperation *operation)
{
  GeglProperties *o = GEGL_PROPERTIES (operation);
  State *state = o->user_data;
  if (!state) return;

  GeglNode *ringnumber = state->s4; /* the default */
  switch (o->rings) {
    case ONE_RING: ringnumber = state->s1; break;
    case TWO_RINGS: ringnumber = state->s2; break;
    case THREE_RINGS: ringnumber = state->s3; break;
    case FOUR_RINGS: ringnumber = state->s4; break;
default: ringnumber = state->s4;

}


  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, ringnumber, state->fix,   NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");


}

    gegl_operation_meta_redirect (operation, "azimuth", state->bevel, "azimuth");


static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass *operation_class;
GeglOperationMetaClass *operation_meta_class = GEGL_OPERATION_META_CLASS (klass);
  operation_class = GEGL_OPERATION_CLASS (klass);

  operation_meta_class->update = update_graph;
operation_class->attach = attach;

  gegl_operation_class_set_keys (operation_class,
    "name",        "lb:ringbevel",
    "title",       _("Ring Bevel"),
    "reference-hash", "r34jghavetheringrightherejfj3",
    "description", _("Make a Ringed Bevel effect"),
    "gimp:menu-path", "<Image>/Filters/Text Styling",
    "gimp:menu-label", _("Ringed Bevel..."),
    NULL);
}

#endif


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Thu Oct 12, 2023 2:15 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Ring Bevel's developmental code updated to include changes from my original idea. A lot of code was removed. The idea of having a wildcard node "ringnumber1-4," that can be 1-4 rings with gegl:nop "do nothing operations" (1-4) is now ditched for a better idea.

There are now four GEGL Graphs that the user can select from. The first graph has 1 ring, the second has 2 rings, the third has 3 rings and the fourth has four rings. Characterized by 1 to 4 SSG's present. The SSG's are state->s1, state->s2, state->s3, state->s4.

GEGL Graphs representing 1-4 rings.

switch (o->rings) {
        break;
    case onering:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
        break;
    case tworings:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
        break;
    case threerings:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
        break;
    case fourrings:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->s4, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
    }
}


Amount of Rings drop down list in the GUI

enum_start (ring_time)
  enum_value (onering,      "onering",
              N_("One Ring"))
  enum_value (tworings,      "tworings",
              N_("Two Rings"))
  enum_value (threerings,      "threerings",
              N_("Three Rings"))
  enum_value (fourrings,      "fourrings",
              N_("Four Rings"))
enum_end (ringtime)
/* This ENUM list has a unique name to avoid conflicts with other plugins or Gimp filters*/

property_enum (rings, _("Amount of Rings"),
    ringtime, ring_time,
    fourrings)
   description  (_("Choose the amount of rings 1-4"))


Incomplete non working Source Code of Ring Bevel
Attachment:
ring_bevel_incomplete.zip [1.02 MiB]
Downloaded 35 times


Last edited by contrast_ on Thu Oct 12, 2023 2:58 pm, edited 1 time in total.

Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Thu Oct 12, 2023 2:27 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
This has nothing to do with the code. its just a banner I made to indicate that this filter requires two other plugins of mine to work. (it ships with them)

Attachment:
dep_preview.png
dep_preview.png [ 716.21 KiB | Viewed 5541 times ]


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Thu Oct 12, 2023 5:20 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
*This problem was solved while making this post. The problem was bevel and bevel2

Progress has been made. The filter now compiles and runs somewhat proper but its graph is not correct as I likely incorrectly positioned the id and ref to call a specific node. I need to investigate why a copy of the custom bevel plugin is not behind the ring text.

Also the 1-4 ring switch works correctly, that and the azimuth are the only GUI parts that work because the others have not been programmed.

Attachment:
image.png
image.png [ 236.25 KiB | Viewed 5532 times ]



THERE ARE INCORRECT NODES SOMEWHERE IN THESE GRAPHS THAT I HAVE TO FIND


switch (o->rings) {
        break;
    case onering:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
        break;
    case tworings:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
        break;
    case threerings:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
        break;
    case fourrings:
  gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->s4, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");
    }
}


The goal is to make it where the bevel2 node is behind everything. And just by looking the code I suggest swapping

  gegl_node_connect_from (state->behind, "aux", state->bevel, "output");


for

  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");


(The other custom bevel) to fix it. That seems to be the mistake, having bevel instead of bevel2. I will have to recompile to see if this fixes it.

Below is the code of the two defined Custom Bevels

The hypothesis why this is not working is because I called bevel1 when I should have called bevel2.
Here are the two bevel nodes.

  state->bevel = gegl_node_new_child (gegl,
                                  "operation", "gegl:custom-bevel", "depth", 4.0, "gaus", 1.0,
                                  NULL);


  state->bevel2 = gegl_node_new_child (gegl,
                                  "operation", "gegl:custom-bevel", "depth", 1.0, "gaus", 1.0,
                                  NULL);



I am recompiling the plugin with the correction now.


Several minutes later.............

IT WORKED

Attachment:
pasted_image270.png
pasted_image270.png [ 238.26 KiB | Viewed 5532 times ]


THE PLUGIN LOOKS JUST LIKE THE GRAPH!!!

But its sliders outside of ring switch and azimuth don't work as they have not been programmed properly.



Source code of Incomplete Ring Bevel attached.
Attachment:
ring_bevel_incomplete.zip [1.02 MiB]
Downloaded 36 times


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Thu Oct 12, 2023 5:48 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Now we have to define all GUI present options

Property_int means GUI options that have integers (1,2,3,4) like this
property_int  (size, _("Size of the Bevel"), 3)
  value_range (1, 9)
  ui_range    (1, 9)
  ui_meta     ("unit", "pixel-distance")
  description (_("Median Radius to control the size of the bevel"))


Property_Double means GUI options that have decimals. Below is a property double.

See how it goes from 7 to 70. It can have in between values like 35.5 or 22.4.

property_double (elevation, _("Elevation"), 35.0)
    description (_("Elevation angle (degrees). This appears to rotate the brightest pixels."))
    value_range (7, 70)
    ui_meta ("unit", "degree")



Both Property_Double_Elevation and Property_Int_Size have to be matched in a 3 part list.


Elevation and Size are Property names that I am using. These can be named anything.

Bevel is the node gegl:custom-bevel (it could be named anything by renaming bevel; which I won't be doing)

In example, custom-bevel alphapercentile=100 size=100 elevation=22

elevation (again) and size (again) is a property name of gegl:custom-bevel
This CANNOT be changed without editing custom-bevel's source code.

So this is the final result


    gegl_operation_meta_redirect (operation, "elevation", state->bevel, "elevation");

    gegl_operation_meta_redirect (operation, "size", state->bevel, "size");


A blank template example is

    gegl_operation_meta_redirect (operation, "property_name_of_new_filter", state->nodename, "original_nodes_property_name");


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Thu Oct 12, 2023 9:21 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
THIS POST CONTAINS A BETA DOWNLOAD THAT ACTUALLY WORKS.

This is the part of the code that defines the GUI options. Read the notes that are in /**/.

/*This is a median blur's radius being called to make the bevel larger, I can't use custom bevel's size because that doesn't work in enlarging both custom bevels*/
    gegl_operation_meta_redirect (operation, "bevelsize", state->mediandictator, "radius");

/*These list the azimuth, elevation and depth of my custom bevel plugin.*/
    gegl_operation_meta_redirect (operation, "azimuth", state->bevel, "azimuth");
    gegl_operation_meta_redirect (operation, "elevation", state->bevel, "elevation");
    gegl_operation_meta_redirect (operation, "depth", state->bevel, "depth");

/*This controls the size of ALL ssg nodes*/
    gegl_operation_meta_redirect (operation, "ringsize", state->s1, "stroke");
    gegl_operation_meta_redirect (operation, "ringsize", state->s2, "stroke");
    gegl_operation_meta_redirect (operation, "ringsize", state->s3, "stroke");
    gegl_operation_meta_redirect (operation, "ringsize", state->s4, "stroke");

/*This controls the blend mode of the bevel and the rings*/
    gegl_operation_meta_redirect (operation, "blendrings", state->bevel, "blendmode");
    gegl_operation_meta_redirect (operation, "blendbevel", state->bevel2, "blendmode");


/*This controls the shape of the rings. It is gegl:ssg grow-shape=square,circle,diamond*/
    gegl_operation_meta_redirect (operation, "ringshape", state->s1, "grow-shape");
    gegl_operation_meta_redirect (operation, "ringshape", state->s2, "grow-shape");
    gegl_operation_meta_redirect (operation, "ringshape", state->s3, "grow-shape");
    gegl_operation_meta_redirect (operation, "ringshape", state->s4, "grow-shape");

/*Slide up if Bevel color is dark. This allows the bevel to work on dark colors*/
    gegl_operation_meta_redirect (operation, "darkbevelslider", state->levels, "out-low");



This is the part of the code that list what is shown in the GUI. Even if it is not defined it will still shown meaning the slider will not work.

enum_start (ring_time)
  enum_value (onering,      "onering",
              N_("One Ring"))
  enum_value (tworings,      "tworings",
              N_("Two Rings"))
  enum_value (threerings,      "threerings",
              N_("Three Rings"))
  enum_value (fourrings,      "fourrings",
              N_("Four Rings"))
enum_end (ringtime)
/* This ENUM list has a unique name to avoid conflicts with other plugins or Gimp filters*/

property_enum (rings, _("Amount of Rings"),
    ringtime, ring_time,
    fourrings)
   description  (_("Choose the amount of rings 1-4"))


property_int  (bevelsize, _("Size of the Bevel"), 3)
  value_range (1, 9)
  ui_range    (1, 9)
  ui_meta     ("unit", "pixel-distance")
  description (_("Median Radius to control the size of the bevel"))


property_int  (ringsize, _("Ring Size"), 6)
  value_range (3, 9)
  ui_range    (3, 9)
  ui_meta     ("unit", "pixel-distance")
  description (_("Control the size of the rings"))



property_double (azimuth, _("Azimuth of ring bevel"), 67.0)
    description (_("Light angle (degrees)"))
    value_range (20, 90)
    ui_meta ("unit", "degree")
    ui_meta ("direction", "ccw")

property_double (elevation, _("Elevation of ring bevel"), 35.0)
    description (_("Elevation angle (degrees). This appears to rotate the brightest pixels."))
    value_range (7, 70)
    ui_meta ("unit", "degree")

property_int (depth, _("Depth and or detail of ring bevel"), 24)
    description (_("Brings out depth and or detail of the bevel depending on the blend mode"))
    value_range (8, 45)

enum_start (under_bevel_blend_mode)
  enum_value (GEGL_BLEND_MODE_TYPE_HARDLIGHT, "Hardlight",
              N_("HardLight"))
  enum_value (GEGL_BLEND_MODE_TYPE_MULTIPLY,      "Multiply",
              N_("Multiply"))
  enum_value (GEGL_BLEND_MODE_TYPE_COLORDODGE,      "ColorDodge",
              N_("ColorDodge"))
  enum_value (GEGL_BLEND_MODE_TYPE_PLUS,      "Plus",
              N_("Plus"))
  enum_value (GEGL_BLEND_MODE_TYPE_DARKEN,      "Darken",
              N_("Darken"))
  enum_value (GEGL_BLEND_MODE_TYPE_LIGHTEN,      "Lighten",
              N_("Lighten"))
  enum_value (GEGL_BLEND_MODE_TYPE_OVERLAY,      "Overlay",
              N_("Overlay"))
  enum_value (GEGL_BLEND_MODE_TYPE_GRAINMERGE,      "GrainMerge",
              N_("Grain Merge"))
  enum_value (GEGL_BLEND_MODE_TYPE_SOFTLIGHT,      "Softlight",
              N_("Soft Light"))
  enum_value (GEGL_BLEND_MODE_TYPE_ADDITION,      "Addition",
              N_("Addition"))
enum_end (underbevelblendmode)

property_enum (blendbevel, _("Under Bevel Blend Mode"),
    underbevelblendmode, under_bevel_blend_mode,
    GEGL_BLEND_MODE_TYPE_HARDLIGHT)
  ui_meta       ("axis", "blendbevel")
  description (_("Blend mode of the bevel under the rings"))


enum_start (ring_bevel_blend_mode)
  enum_value (GEGL_BLEND_MODE_TYPE_HARDLIGHTX, "Hardlight",
              N_("HardLight"))
  enum_value (GEGL_BLEND_MODE_TYPE_MULTIPLYX,      "Multiply",
              N_("Multiply"))
  enum_value (GEGL_BLEND_MODE_TYPE_COLORDODGEX,      "ColorDodge",
              N_("ColorDodge"))
  enum_value (GEGL_BLEND_MODE_TYPE_PLUSX,      "Plus",
              N_("Plus"))
  enum_value (GEGL_BLEND_MODE_TYPE_DARKENX,      "Darken",
              N_("Darken"))
  enum_value (GEGL_BLEND_MODE_TYPE_LIGHTENX,      "Lighten",
              N_("Lighten"))
  enum_value (GEGL_BLEND_MODE_TYPE_OVERLAYX,      "Overlay",
              N_("Overlay"))
  enum_value (GEGL_BLEND_MODE_TYPE_GRAINMERGEX,      "GrainMerge",
              N_("Grain Merge"))
  enum_value (GEGL_BLEND_MODE_TYPE_SOFTLIGHTX,      "Softlight",
              N_("Soft Light"))
  enum_value (GEGL_BLEND_MODE_TYPE_ADDITIONX,      "Addition",
              N_("Addition"))
enum_end (ringbevelblendmode)

property_enum (blendrings, _("Ring Bevel Blend Mode"),
    ringbevelblendmode, ring_bevel_blend_mode,
    GEGL_BLEND_MODE_TYPE_HARDLIGHTX)
  description (_("Blend mode of the ring bevel"))



enum_start (shape_of_ring)
  enum_value (GEGL_MEDIAN_BLUR_NEIGHBORHOOD_SQUARE,  "square",  N_("Square"))
  enum_value (GEGL_MEDIAN_BLUR_NEIGHBORHOOD_CIRCLE,  "circle",  N_("Circle"))
  enum_value (GEGL_MEDIAN_BLUR_NEIGHBORHOOD_DIAMOND, "diamond", N_("Diamond"))
enum_end (shapeofring)

property_enum (ringshape, _("Shape of Ring"),
    shapeofring, shape_of_ring,
               GEGL_MEDIAN_BLUR_NEIGHBORHOOD_CIRCLE)
  description (_("Shape of the Rings that internally uses Median Blur's neighborhood setting (square, circle, diamond)"))


property_double (darkbevelslider, _("Dark Color Bevel Fix"), 0.0)
    description (_("Elevation "))
    value_range (0.0, 0.20)
    ui_meta ("unit", "degree")
  description (_("Slide up if the Bevel is a dark color and the dark color will conform to the bevel. If not the dark color will not look proper. If this slider is up on a light color then it will modify it in a potential unwanted way."))




Here is the final GEGL Graph. It was given a new node, "mediandictator" that controls the size of both the ring bevel and background bevel via a median blur at the start of the graph. This node did not exist in earlier versions of the code

/*Let's analysis what is going on below

The same idref is called 3 times. The first is a bookmark (the id=bookmark) the second is a (ref=bookmark) inside the erase blend mode. THe third is a (ref=bookmark) inside the behind blend mode.
Remember. idref is a gegl:nop (no operation).

There are two blend modes being called "erase blend mode" gegl:dst-out, and the behind blend mode and "gegl:dst-over" The blend modes that the bevels call are baked inside custom-bevel's .c file
not this. They are being called by bevel1 and bevel2, but so is every other property name of custom bevel.

Fix is a median blur radius=0 at the end that resets internal values in the graph from a known bug where the drop shadow filter glitches out. median blur at 0 makes 0 changes to an image.


This shows all the nodes and composers "erase" and "behind"
  gegl_node_link_many (state->input, state->mediandictator, state->levels, state->idref, state->erase,  state->bevel, state->behind, state->output, NULL);


This is the content inside the erase blend mode. Their can be up to 3 more SSGs but this graph only has 1; s1. 

  gegl_node_link_many (state->idref, state->median, state->s1, (potentially three other SSGs) state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");



This is the content inside the behind blend mode.
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");


So yeah read the notes to understand what is going on. Below attached is a working download to a beta version of the plugin that works mostly normal.

BETA BINARIES AND CODE FOR WINDOWS AND LINUX (THIS WORKS NORMAL) but the plugin is still not done
Attachment:
ring_bevel_beta_download.zip [1.95 MiB]
Downloaded 35 times


Attachment:
beta_download.png
beta_download.png [ 553.1 KiB | Viewed 5525 times ]


Attachment:
love_gegl.png
love_gegl.png [ 258.56 KiB | Viewed 5525 times ]


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Fri Oct 13, 2023 6:41 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Attachment:
cm.png
cm.png [ 225.03 KiB | Viewed 5508 times ]


Ring Bevel got a color change checkbox that when enabled makes the bevel any color. How did this happen?

This code below list 8 GEGL graphs total, with four GEGL graphs for each ring (we established that already), with an almost carbon copy of the first four nodes and the last four nodes except the first four nodes contain a state->color node at the beginning. Those first four rings are the ones that are recolored when the checkbox is enabled.

state->color is gegl:coloroverlay

colormode is a GUI property for the checkbox.


Notice how the node state->color is only on the top four graphs and is not present after the else?


if (o->colormode)

switch (o->rings) {
        break;
    case onering:
  gegl_node_link_many (state->input, state->color, state->mediandictator, state->levels, state->idref, state->erase,  state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
        break;
    case tworings:
  gegl_node_link_many (state->input, state->color, state->mediandictator,  state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
        break;
    case threerings:
  gegl_node_link_many (state->input, state->color, state->mediandictator, state->levels, state->idref, state->erase,   state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
        break;
    case fourrings:
  gegl_node_link_many (state->input, state->color, state->mediandictator, state->levels, state->idref, state->erase,   state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->s4, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");

    }

else

switch (o->rings) {
        break;
    case onering:
  gegl_node_link_many (state->input, state->mediandictator, state->levels, state->idref, state->erase,  state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
        break;
    case tworings:
  gegl_node_link_many (state->input, state->mediandictator,  state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
        break;
    case threerings:
  gegl_node_link_many (state->input, state->mediandictator, state->levels, state->idref, state->erase,   state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
        break;
    case fourrings:
  gegl_node_link_many (state->input, state->mediandictator, state->levels, state->idref, state->erase,   state->bevel, state->behind, state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->s2, state->s3, state->s4, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");


    }
}


This is the GUI aspect of the color checkbox.

property_boolean (colormode, _("Recolor bevel"), FALSE)
  description    (_("Recolor Bevel with whatever color you want. By default this is disabled."))

property_color  (color, _("Color of bevel"), "#ff9f00")
    description (_("Optional Color Overlay for Ringed Bevel. Is only enabled if its checkbox is on."))
  ui_meta     ("sensitive", "colormode")


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Fri Oct 13, 2023 6:47 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Here is the final definition of the GUI properties *with notes

/*This is a median blur's radius being called to make the bevel larger, I can't use custom bevel's size because that doesn't work in enlarging both custom bevels*/
    gegl_operation_meta_redirect (operation, "bevelsize", state->mediandictator, "radius");

/*These list the azimuth, elevation and depth of my custom bevel plugin.*/
    gegl_operation_meta_redirect (operation, "azimuth", state->bevel, "azimuth");
    gegl_operation_meta_redirect (operation, "elevation", state->bevel, "elevation");
    gegl_operation_meta_redirect (operation, "depth", state->bevel, "depth");

/*This controls the size of ALL ssg nodes*/
    gegl_operation_meta_redirect (operation, "ringsize", state->s1, "stroke");
    gegl_operation_meta_redirect (operation, "ringsize", state->s2, "stroke");
    gegl_operation_meta_redirect (operation, "ringsize", state->s3, "stroke");
    gegl_operation_meta_redirect (operation, "ringsize", state->s4, "stroke");

/*This controls the blend mode of the bevel and the rings*/
    gegl_operation_meta_redirect (operation, "blendrings", state->bevel, "blendmode");
    gegl_operation_meta_redirect (operation, "blendbevel", state->bevel2, "blendmode");


/*This controls the shape of the rings. It is gegl:ssg grow-shape=square,circle,diamond*/
    gegl_operation_meta_redirect (operation, "ringshape", state->s1, "grow-shape");
    gegl_operation_meta_redirect (operation, "ringshape", state->s2, "grow-shape");
    gegl_operation_meta_redirect (operation, "ringshape", state->s3, "grow-shape");
    gegl_operation_meta_redirect (operation, "ringshape", state->s4, "grow-shape");

/*Slide up if Bevel color is dark. This allows the bevel to work on dark colors*/
    gegl_operation_meta_redirect (operation, "darkbevelslider", state->levels, "out-low");

/*Recolor node that only kicks in with the checkbox*/
    gegl_operation_meta_redirect (operation, "color", state->color, "value");




Here is the final GUI properties that the user sees (excluding ENUM list)

enum_start (ring_time)
  enum_value (onering,      "onering",
              N_("One Ring"))
  enum_value (tworings,      "tworings",
              N_("Two Rings"))
  enum_value (threerings,      "threerings",
              N_("Three Rings"))
  enum_value (fourrings,      "fourrings",
              N_("Four Rings"))
enum_end (ringtime)
/* This ENUM list has a unique name to avoid conflicts with other plugins or Gimp filters*/

property_enum (rings, _("Amount of rings"),
    ringtime, ring_time,
    fourrings)
   description  (_("Choose the amount of rings 1-4"))


property_int  (bevelsize, _("Size of the bevel"), 3)
  value_range (1, 9)
  ui_range    (1, 9)
  ui_meta     ("unit", "pixel-distance")
  description (_("Median Radius to control the size of the bevel"))


property_int  (ringsize, _("Ring size"), 6)
  value_range (3, 9)
  ui_range    (3, 9)
  ui_meta     ("unit", "pixel-distance")
  description (_("Control the size of the rings"))



property_double (azimuth, _("Azimuth of ring bevel"), 67.0)
    description (_("Light angle (degrees)"))
    value_range (20, 90)
    ui_meta ("unit", "degree")
    ui_meta ("direction", "ccw")

property_double (elevation, _("Elevation of ring bevel"), 35.0)
    description (_("Elevation angle (degrees). This appears to rotate the brightest pixels."))
    value_range (7, 70)
    ui_meta ("unit", "degree")

property_int (depth, _("Depth and or detail of ring bevel"), 24)
    description (_("Brings out depth and or detail of the bevel depending on the blend mode"))
    value_range (8, 45)

enum_start (under_bevel_blend_mode)
  enum_value (GEGL_BLEND_MODE_TYPE_HARDLIGHT, "Hardlight",
              N_("HardLight"))
  enum_value (GEGL_BLEND_MODE_TYPE_MULTIPLY,      "Multiply",
              N_("Multiply"))
  enum_value (GEGL_BLEND_MODE_TYPE_COLORDODGE,      "ColorDodge",
              N_("ColorDodge"))
  enum_value (GEGL_BLEND_MODE_TYPE_PLUS,      "Plus",
              N_("Plus"))
  enum_value (GEGL_BLEND_MODE_TYPE_DARKEN,      "Darken",
              N_("Darken"))
  enum_value (GEGL_BLEND_MODE_TYPE_LIGHTEN,      "Lighten",
              N_("Lighten"))
  enum_value (GEGL_BLEND_MODE_TYPE_OVERLAY,      "Overlay",
              N_("Overlay"))
  enum_value (GEGL_BLEND_MODE_TYPE_GRAINMERGE,      "GrainMerge",
              N_("Grain Merge"))
  enum_value (GEGL_BLEND_MODE_TYPE_SOFTLIGHT,      "Softlight",
              N_("Soft Light"))
  enum_value (GEGL_BLEND_MODE_TYPE_ADDITION,      "Addition",
              N_("Addition"))
enum_end (underbevelblendmode)

property_enum (blendbevel, _("Under bevel blend mode"),
    underbevelblendmode, under_bevel_blend_mode,
    GEGL_BLEND_MODE_TYPE_HARDLIGHT)
  ui_meta       ("axis", "blendbevel")
  description (_("Blend mode of the bevel under the rings"))


enum_start (ring_bevel_blend_mode)
  enum_value (GEGL_BLEND_MODE_TYPE_HARDLIGHTX, "Hardlight",
              N_("HardLight"))
  enum_value (GEGL_BLEND_MODE_TYPE_MULTIPLYX,      "Multiply",
              N_("Multiply"))
  enum_value (GEGL_BLEND_MODE_TYPE_COLORDODGEX,      "ColorDodge",
              N_("ColorDodge"))
  enum_value (GEGL_BLEND_MODE_TYPE_PLUSX,      "Plus",
              N_("Plus"))
  enum_value (GEGL_BLEND_MODE_TYPE_DARKENX,      "Darken",
              N_("Darken"))
  enum_value (GEGL_BLEND_MODE_TYPE_LIGHTENX,      "Lighten",
              N_("Lighten"))
  enum_value (GEGL_BLEND_MODE_TYPE_OVERLAYX,      "Overlay",
              N_("Overlay"))
  enum_value (GEGL_BLEND_MODE_TYPE_GRAINMERGEX,      "GrainMerge",
              N_("Grain Merge"))
  enum_value (GEGL_BLEND_MODE_TYPE_SOFTLIGHTX,      "Softlight",
              N_("Soft Light"))
  enum_value (GEGL_BLEND_MODE_TYPE_ADDITIONX,      "Addition",
              N_("Addition"))
enum_end (ringbevelblendmode)

property_enum (blendrings, _("Ring bevel blend mode"),
    ringbevelblendmode, ring_bevel_blend_mode,
    GEGL_BLEND_MODE_TYPE_HARDLIGHTX)
  description (_("Blend mode of the ring bevel"))



enum_start (shape_of_ring)
  enum_value (GEGL_MEDIAN_BLUR_NEIGHBORHOOD_SQUARE,  "square",  N_("Square"))
  enum_value (GEGL_MEDIAN_BLUR_NEIGHBORHOOD_CIRCLE,  "circle",  N_("Circle"))
  enum_value (GEGL_MEDIAN_BLUR_NEIGHBORHOOD_DIAMOND, "diamond", N_("Diamond"))
enum_end (shapeofring)

property_enum (ringshape, _("Shape of ring"),
    shapeofring, shape_of_ring,
               GEGL_MEDIAN_BLUR_NEIGHBORHOOD_CIRCLE)
  description (_("Shape of the Rings that internally uses Median Blur's neighborhood setting (square, circle, diamond)"))


property_double (darkbevelslider, _("Dark color bevel fix"), 0.0)
    description (_("Elevation "))
    value_range (0.0, 0.12)
    ui_meta ("unit", "degree")
  description (_("Slide up if the Bevel is a dark color and the dark color will conform to the bevel. If not the dark color will not look proper. If this slider is up on a light color then it will modify it in a potential unwanted way."))

property_boolean (colormode, _("Recolor bevel"), FALSE)
  description    (_("Recolor Bevel with whatever color you want. By default this is disabled."))

property_color  (color, _("Color of bevel"), "#ff9f00")
    description (_("Optional Color Overlay for Ringed Bevel. Is only enabled if its checkbox is on."))
  ui_meta     ("sensitive", "colormode")




Here is another example of how the three part properties work. Take (darkbevelslider, levels, out-low) as an example.

gegl_operation_meta_redirect (operation, "darkbevelslider", state->levels, "out-low");

darkbevelslider
is the defined property name. IE lb:ringbevel darkbevelslider=

state->levels is gegl:levels, and it was named that via this

state->levels = gegl_node_new_child (gegl,
                                  "operation", "gegl:levels",
                                  NULL);

It could have been named anything.


out-low is the property name inside level's .c file and it cannot be changed without editing level's .c file.


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Fri Oct 13, 2023 6:58 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Notice how the checkbox in the latest beta build disables the color overlay when enabled?

That is because of this

property_color  (color, _("Color of bevel"), "#ff9f00")
    description (_("Optional Color Overlay for Ringed Bevel. Is only enabled if its checkbox is on."))
  ui_meta     ("sensitive", "colormode")


ui_meta ("sensitive", "colormode")

The ui_meta command sensitive disables coloroverlay when colormode (the checkbox) is presed.


Below is a download to the latest source code with no binaries.
Attachment:
latest_beta_almost_done.zip [17.58 KiB]
Downloaded 40 times

By the end of the day this plugin should be ready for Github and I'll update the title when that happens.


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Fri Oct 13, 2023 9:47 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
*binary download available here.

Ok this could be the final release.

I added a image file upload by adding nodes

state->multiply (gegl:multiply)
state->idrefimage (gegl:nop)
state->image (gegl:layer src=)

gegl:layer is the one that calls the image file. And if you figured it out the image file is blended by the "multiply blend mode"

  gegl_node_link_many (state->input, state->color, state->mediandictator, state->levels, state->idref, state->erase,  state->bevel, state->behind,  state->idrefimage, state->multiply,  state->output, NULL);
  gegl_node_link_many (state->idref, state->median, state->s1, state->fix, NULL);
  gegl_node_connect_from (state->erase, "aux", state->fix, "output");
  gegl_node_link_many (state->idref, state->bevel2,   NULL);
  gegl_node_connect_from (state->behind, "aux", state->bevel2, "output");
  gegl_node_link_many (state->idrefimage, state->image,   NULL);
  gegl_node_connect_from (state->multiply, "aux", state->image, "output");


All 8 graphs were updated to include an image file upload that works best on grayscale text.
Attachment:
8graphs_image.png
8graphs_image.png [ 52.32 KiB | Viewed 5401 times ]



Preview

Attachment:
sandy.png
sandy.png [ 831.09 KiB | Viewed 5401 times ]



This may be on Github in a few hours.

Contains Windows and Linux Binaries and Source Code.

Attachment:
ring_bevel_probably_final.zip [4.55 MiB]
Downloaded 36 times


Top
 Post subject: Re: GEGL Ring Bevel (Plugin in development)
PostPosted: Fri Oct 13, 2023 10:04 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Image

In three-four hours this will be on Github if nothing goes wrong during testing.


Top
 Post subject: Re: GEGL Ring Bevel Plugin Download
PostPosted: Fri Oct 13, 2023 2:25 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
This plugin is released.

https://github.com/LinuxBeaver/Gimp_Rin ... imp_Plugin


Location to put binaries

**Windows**

C:\Users\(USERNAME)\AppData\Local\gegl-0.4\plug-ins

**Linux**

/home/(USERNAME)/.local/share/gegl-0.4/plug-ins

**Linux (Flatpak includes Chromebook)**

/home/(USERNAME)/.var/app/org.gimp.GIMP/data/gegl-0.4/plug-ins

Then Restart Gimp and go to GEGL Operations and look for "Ringed Bevel" or in 2.99.16+
filters>text styling>ringed bevel. Enjoy and lets discuss the non-technical stuff of the plugin here.


Its fun how I made this plugin by running my ssg filter with the erase blend mode.
Attachment:
1.png
1.png [ 494.26 KiB | Viewed 5393 times ]


Top
 Post subject: Re: GEGL Ring Bevel Plugin Download
PostPosted: Fri Oct 13, 2023 4:06 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Day one update (after being released on Github). Bottom Bevel now has an opacity slider to hide it.


Attachment:
2023-10-13_16-39.png
2023-10-13_16-39.png [ 449.12 KiB | Viewed 5390 times ]


Top
 Post subject: Re: GEGL Ring Bevel Plugin Download
PostPosted: Sat Oct 14, 2023 9:51 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
https://github.com/LinuxBeaver/Gimp_Rin ... mp_Plugin/
Ring Bevel's github got an update that does nothing but fix a bug where in default the multiply blend mode of the color overlay ran over it making a yellow bevel orange or a light blue bevel dark blue.

This bug is fixed and now we can have light blue or yellow bevel's easier. Before it was still possible but you'd have to use a really bright yellow. Ring Bevel also has a sister plugin "ring text" that puts rings around plain text. You'll see it floating on Gimp Chat


Top
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Plain Ring Text plugin

1

No new posts Attachment(s) GEGL Ocean Caustics (plugin download)

6

No new posts Attachment(s) GEGL Pixel Text - plugin download

8

No new posts Attachment(s) GEGL Sparkle effect plugin - download provided

5

No new posts Attachment(s) GEGL ROYAL TEXT plugin (download provided)

11



* Login  



Powered by phpBB3 © phpBB Group