[gegl/wip/rishi/operation-shadhi: 2/4] operation: Support getting the source nodes of meta-ops



commit 37de796c3aefe753bcaf18d827073512c24ca43d
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Nov 10 11:09:43 2017 +0100

    operation: Support getting the source nodes of meta-ops
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790111

 gegl/operation/gegl-operation.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gegl/operation/gegl-operation.c b/gegl/operation/gegl-operation.c
index c95242c..53efa4d 100644
--- a/gegl/operation/gegl-operation.c
+++ b/gegl/operation/gegl-operation.c
@@ -349,13 +349,21 @@ GeglNode *
 gegl_operation_get_source_node (GeglOperation *operation,
                                 const gchar   *input_pad_name)
 {
+  GeglNode *node;
   GeglPad *pad;
 
   g_return_val_if_fail (GEGL_IS_OPERATION (operation), NULL);
   g_return_val_if_fail (GEGL_IS_NODE (operation->node), NULL);
   g_return_val_if_fail (input_pad_name != NULL, NULL);
 
-  pad = gegl_node_get_pad (operation->node, input_pad_name);
+  node = operation->node;
+  if (node->is_graph)
+    {
+      node = gegl_node_get_input_proxy (node, input_pad_name);
+      input_pad_name = "input";
+    }
+
+  pad = gegl_node_get_pad (node, input_pad_name);
 
   if (!pad)
     return NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]