[gimp] app: don't let image component mask affect channel colors



commit 56920dcdbfc2cf7cfd72f1ec1438f8fe46e3da7b
Author: Ell <ell_se yahoo com>
Date:   Sun Nov 4 13:18:08 2018 -0500

    app: don't let image component mask affect channel colors
    
    Connect GimpImage's gimp:mask-components node to the layers node
    *before* connecting the channels node, so that the image's
    component mask doesn't affect the channel colors, as is the case in
    2.8.

 app/core/gimpimage.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 172a2c3e6a..3e165cb6c9 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1565,14 +1565,6 @@ gimp_image_get_graph (GimpProjectable *projectable)
 
   gegl_node_add_child (private->graph, layers_node);
 
-  channels_node =
-    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->channels->container));
-
-  gegl_node_add_child (private->graph, channels_node);
-
-  gegl_node_connect_to (layers_node,   "output",
-                        channels_node, "input");
-
   mask = ~gimp_image_get_visible_mask (image) & GIMP_COMPONENT_MASK_ALL;
 
   private->visible_mask =
@@ -1581,13 +1573,21 @@ gimp_image_get_graph (GimpProjectable *projectable)
                          "mask",      mask,
                          NULL);
 
-  gegl_node_connect_to (channels_node,         "output",
+  gegl_node_connect_to (layers_node,           "output",
                         private->visible_mask, "input");
 
-  output = gegl_node_get_output_proxy (private->graph, "output");
+  channels_node =
+    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->channels->container));
+
+  gegl_node_add_child (private->graph, channels_node);
 
   gegl_node_connect_to (private->visible_mask, "output",
-                        output,                "input");
+                        channels_node,         "input");
+
+  output = gegl_node_get_output_proxy (private->graph, "output");
+
+  gegl_node_connect_to (channels_node, "output",
+                        output,        "input");
 
   return private->graph;
 }


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