Geometry Nodes: Don't start with empty group nodes selected

The nodes were selected in new node groups because they are by default,
but there's no particular reason for them to be selected, and it can
be distracting.
This commit is contained in:
Hans Goudey 2021-01-08 16:28:53 -06:00
parent 7fd19c20e0
commit 69a22a70ac
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,9 @@ def geometry_node_group_empty_new(context):
output_node = group.nodes.new('NodeGroupOutput')
output_node.is_active_output = True
input_node.select = False
output_node.select = False
input_node.location.x = -200 - input_node.width
output_node.location.x = 200

View File

@ -754,6 +754,9 @@ void MOD_nodes_init(Main *bmain, NodesModifierData *nmd)
bNode *group_input_node = nodeAddStaticNode(nullptr, ntree, NODE_GROUP_INPUT);
bNode *group_output_node = nodeAddStaticNode(nullptr, ntree, NODE_GROUP_OUTPUT);
nodeSetSelected(group_input_node, false);
nodeSetSelected(group_output_node, false);
group_input_node->locx = -200 - group_input_node->width;
group_output_node->locx = 200;
group_output_node->flag |= NODE_DO_OUTPUT;