Commit: 2db71782e750313fc2c7d0a420e0fab6e06e38d4
Author: Campbell Barton
Date:   Mon Sep 14 20:39:20 2015 +1000
Branches: master
https://developer.blender.org/rB2db71782e750313fc2c7d0a420e0fab6e06e38d4

Fix T46106: Hidden socket w/ node link from Py API

Internally this was OK, but an invalid state from the users POV.

===================================================================

M       source/blender/makesrna/intern/rna_nodetree.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_nodetree.c 
b/source/blender/makesrna/intern/rna_nodetree.c
index 8894e07..8ebc3f0 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -792,6 +792,11 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, 
ReportList *reports,
        ret = nodeAddLink(ntree, fromnode, fromsock, tonode, tosock);
        
        if (ret) {
+
+               /* not an issue from the UI, clear hidden from API to keep 
valid state. */
+               fromsock->flag &= ~SOCK_HIDDEN;
+               tosock->flag   &= ~SOCK_HIDDEN;
+
                if (tonode)
                        nodeUpdate(ntree, tonode);

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

Reply via email to