Fix for the use_hidden_preview setting in SpaceNode. The application of this flag to new nodes got lost during merges at some point. Also is now in the python node.add_node operator as well as the C function.

This commit is contained in:
Lukas Toenne 2013-03-22 13:08:37 +00:00
parent 7f86b8afeb
commit 309c487b96
2 changed files with 6 additions and 0 deletions

@ -44,6 +44,9 @@ class NodeAddOperator():
node = tree.nodes.new(type=node_type)
if space.use_hidden_preview:
node.show_preview = False
node.select = True
tree.nodes.active = node
node.location = space.cursor_location

@ -110,6 +110,9 @@ bNode *node_add_node(const bContext *C, const char *idname, int type, float locx
if (node->id)
id_us_plus(node->id);
if (snode->flag & SNODE_USE_HIDDEN_PREVIEW)
node->flag &= ~NODE_PREVIEW;
snode_update(snode, node);
if (snode->nodetree->type == NTREE_TEXTURE) {