Revision: 38813
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38813
Author:   lukastoenne
Date:     2011-07-29 07:14:03 +0000 (Fri, 29 Jul 2011)
Log Message:
-----------
When relinking node group outputs from sockets of different type, automatically 
change the output to the source type. Feature request by Daniel Salazar.

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

Modified: trunk/blender/source/blender/editors/space_node/node_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_edit.c 2011-07-29 
06:32:30 UTC (rev 38812)
+++ trunk/blender/source/blender/editors/space_node/node_edit.c 2011-07-29 
07:14:03 UTC (rev 38813)
@@ -2216,6 +2216,12 @@
                                /* we might need to remove a link */
                                if(in_out==SOCK_OUT)
                                        node_remove_extra_links(snode, 
link->tosock, link);
+                               
+                               /* when linking to group outputs, update the 
socket type */
+                               /* XXX this should all be part of a generic 
update system */
+                               if (!link->tonode) {
+                                       link->tosock->type = 
link->fromsock->type;
+                               }
                        }
                        else if (outside_group_rect(snode) && (link->tonode || 
link->fromnode)) {
                                /* automatically add new group socket */

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

Reply via email to