Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-09-14 13:39:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-14 13:39:20 +0300
commit2db71782e750313fc2c7d0a420e0fab6e06e38d4 (patch)
treebd241cba33a8174915f91fab9be0fdd7c42d6ad8
parent5611237391db8badf5e64dc559b5ac456631e1de (diff)
Fix T46106: Hidden socket w/ node link from Py API
Internally this was OK, but an invalid state from the users POV.
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 8894e071a3b..8ebc3f03608 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);