gegl-serialize: api hack permitting returning a pointer

Allow inserting a return pointer using the error pointer, this to be used as a
hack for the commandline permitting specifying a sink op as last member of
chain.
parent 9fa211b6
......@@ -103,6 +103,14 @@ gegl_create_chain_argv (char **ops,
GHashTable *ht = NULL;
GeglPath *path = NULL;
GString *string = NULL;
GeglNode **ret_sinkp = NULL;
if (error && *error)
{
GeglNode **an = (void*)error;
ret_sinkp = *an;
*error = NULL;
}
remove_in_betweens (start, proxy);
......@@ -110,6 +118,8 @@ gegl_create_chain_argv (char **ops,
ht = g_hash_table_new (g_str_hash, g_str_equal);
while (*arg)
{
if (in_keyframes)
......@@ -627,10 +637,17 @@ gegl_create_chain_argv (char **ops,
proxy), "operation",
level_op[level], NULL);
if (gegl_node_has_pad (new, "output"))
{
if (iter[level] && gegl_node_has_pad (new, "input"))
gegl_node_link_many (iter[level], new, proxy, NULL);
else
gegl_node_link_many (new, proxy, NULL);
}
else
{
gegl_node_link_many (iter[level], new, NULL);
}
iter[level] = new;
}
else if (error)
......@@ -695,7 +712,17 @@ gegl_create_chain_argv (char **ops,
g_free (prop);
g_hash_table_unref (ht);
if (gegl_node_has_pad (iter[level], "output"))
gegl_node_link_many (iter[level], proxy, NULL);
else
{
if (ret_sinkp)
{
*ret_sinkp = iter[level];
}
}
}
void
......
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