diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-04-16 14:50:57 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-04-16 14:50:57 +0400 |
commit | 5c646e7e3a48c7fea0bfea407d3d27df0b1aa02b (patch) | |
tree | d3593a23f7df93a00aa895143ee0a1ba98d22712 /source/blender/blenloader/intern | |
parent | bd613739ae4ebfa97471c34cfa4077f3c3e18afc (diff) |
Reverted r43219 "Improved auto-hiding of unused sockets for collapsed nodes."
This feature did have a number of flaws and caused some controversy, so removal is the better option. Hiding nodes without prior connections would just hide all the sockets, leaving an unusable node. Better way is to use the ctrl+h shortcut to explicitly hide unused sockets when necessary.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6a40e1ebf43..4242b89c3e7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7672,32 +7672,6 @@ static void do_versions_nodetree_socket_use_flags_2_62(bNodeTree *ntree) } } -/* set the SOCK_AUTO_HIDDEN flag on collapsed nodes */ -static void do_versions_nodetree_socket_auto_hidden_flags_2_62(bNodeTree *ntree) -{ - bNode *node; - bNodeSocket *sock; - - for (node=ntree->nodes.first; node; node=node->next) { - if (node->flag & NODE_HIDDEN) { - for (sock=node->inputs.first; sock; sock=sock->next) { - if (sock->link==NULL) - sock->flag |= SOCK_AUTO_HIDDEN; - } - for (sock=node->outputs.first; sock; sock= sock->next) { - if (nodeCountSocketLinks(ntree, sock)==0) - sock->flag |= SOCK_AUTO_HIDDEN; - } - } - else { - for (sock=node->inputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_AUTO_HIDDEN; - for (sock=node->outputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_AUTO_HIDDEN; - } - } -} - static void do_versions_nodetree_multi_file_output_format_2_62_1(Scene *sce, bNodeTree *ntree) { bNode *node; @@ -13120,38 +13094,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - { - /* set the SOCK_AUTO_HIDDEN flag on collapsed nodes */ - Scene *sce; - Material *mat; - Tex *tex; - Lamp *lamp; - World *world; - bNodeTree *ntree; - - for (sce=main->scene.first; sce; sce=sce->id.next) - if (sce->nodetree) - do_versions_nodetree_socket_auto_hidden_flags_2_62(sce->nodetree); - - for (mat=main->mat.first; mat; mat=mat->id.next) - if (mat->nodetree) - do_versions_nodetree_socket_auto_hidden_flags_2_62(mat->nodetree); - - for (tex=main->tex.first; tex; tex=tex->id.next) - if (tex->nodetree) - do_versions_nodetree_socket_auto_hidden_flags_2_62(tex->nodetree); - - for (lamp=main->lamp.first; lamp; lamp=lamp->id.next) - if (lamp->nodetree) - do_versions_nodetree_socket_auto_hidden_flags_2_62(lamp->nodetree); - - for (world=main->world.first; world; world=world->id.next) - if (world->nodetree) - do_versions_nodetree_socket_auto_hidden_flags_2_62(world->nodetree); - - for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) - do_versions_nodetree_socket_auto_hidden_flags_2_62(ntree); - } } if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 2)) |