bin: permit passing sink node as part of -- chain

parent 523b32c3
......@@ -204,6 +204,7 @@ main (gint argc,
}
}
if (o->mode == GEGL_RUN_MODE_DISPLAY)
{
#if HAVE_MRG
......@@ -228,12 +229,19 @@ main (gint argc,
GeglNode *iter = gegl_node_get_producer (proxy, "input", NULL);
if (o->rest)
{
GError *error = NULL;
GeglNode *ret_sink = NULL;
GError *error = (void*)(&ret_sink);
gegl_create_chain_argv (o->rest, iter, proxy, 0, gegl_node_get_bounding_box (gegl).height, path_root, &error);
if (error)
{
fprintf (stderr, "Error: %s\n", error->message);
}
if (ret_sink)
{
gegl_node_process (ret_sink);
exit(0);
}
if (o->serialize)
{
fprintf (stderr, "%s\n", gegl_serialize (iter,
......
......@@ -1321,7 +1321,8 @@ static void load_path (State *o)
}
if (o->ops)
{
GError *error = NULL;
GeglNode *ret_sink = NULL;
GError *error = (void*)(&ret_sink);
char *containing_path = get_path_parent (o->path);
gegl_create_chain_argv (o->ops,
......@@ -1334,6 +1335,11 @@ static void load_path (State *o)
{
fprintf (stderr, "Error: %s\n", error->message);
}
if (ret_sink)
{
gegl_node_process (ret_sink);
exit(0);
}
zoom_to_fit (o);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment