Revision: 48233
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48233
Author:   lukastoenne
Date:     2012-06-24 10:49:22 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
Fix #31908, better drawing for node group interface links. Links from/to node 
group internal sockets (input/output columns on the side) were drawn in a kind 
of subtle "background" mode, making them hard to see behind nodes. This was 
still from pre-2.56.2 versions, where group interfaces were created 
automatically and these links were just indicators of which external socket a 
node refers to.

Now these links are drawn in the same way as all others. Also they now display 
highlighting correctly when inserting a node into a link, making it easier to 
avoid unwanted insertions.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_node/drawnode.c

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2012-06-24 
10:31:48 UTC (rev 48232)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2012-06-24 
10:49:22 UTC (rev 48233)
@@ -3316,37 +3316,34 @@
                do_triple = TRUE;
        }
        else {
+               int cycle = 0;
+               
                /* going to give issues once... */
                if (link->tosock->flag & SOCK_UNAVAIL)
                        return;
                if (link->fromsock->flag & SOCK_UNAVAIL)
                        return;
                
-               /* a bit ugly... but thats how we detect the internal group 
links */
-               if (!link->fromnode || !link->tonode) {
-                       UI_ThemeColorBlend(TH_BACK, TH_WIRE, 0.5f);
-                       do_shaded = FALSE;
-               }
-               else {
-                       /* check cyclic */
-                       if ((link->fromnode->level >= link->tonode->level && 
link->tonode->level != 0xFFF) && (link->flag & NODE_LINK_VALID)) {
-                               /* special indicated link, on drop-node */
-                               if (link->flag & NODE_LINKFLAG_HILITE) {
-                                       th_col1 = th_col2 = TH_ACTIVE;
-                               }
-                               else {
-                                       /* regular link */
-                                       if (link->fromnode->flag & SELECT)
-                                               th_col1 = TH_EDGE_SELECT;
-                                       if (link->tonode->flag & SELECT)
-                                               th_col2 = TH_EDGE_SELECT;
-                               }
-                               do_shaded = TRUE;
-                               do_triple = TRUE;
-                       }                               
+               /* check cyclic */
+               if (link->fromnode && link->tonode)
+                       cycle = (link->fromnode->level < link->tonode->level || 
link->tonode->level == 0xFFF);
+               if (!cycle && (link->flag & NODE_LINK_VALID)) {
+                       /* special indicated link, on drop-node */
+                       if (link->flag & NODE_LINKFLAG_HILITE) {
+                               th_col1 = th_col2 = TH_ACTIVE;
+                       }
                        else {
-                               th_col1 = TH_REDALERT;
+                               /* regular link */
+                               if (link->fromnode && link->fromnode->flag & 
SELECT)
+                                       th_col1 = TH_EDGE_SELECT;
+                               if (link->tonode && link->tonode->flag & SELECT)
+                                       th_col2 = TH_EDGE_SELECT;
                        }
+                       do_shaded = TRUE;
+                       do_triple = TRUE;
+               }                               
+               else {
+                       th_col1 = TH_REDALERT;
                }
        }
        

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to