forked from bartvdbraak/blender
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:
parent
7f86b8afeb
commit
309c487b96
@ -44,6 +44,9 @@ class NodeAddOperator():
|
|||||||
|
|
||||||
node = tree.nodes.new(type=node_type)
|
node = tree.nodes.new(type=node_type)
|
||||||
|
|
||||||
|
if space.use_hidden_preview:
|
||||||
|
node.show_preview = False
|
||||||
|
|
||||||
node.select = True
|
node.select = True
|
||||||
tree.nodes.active = node
|
tree.nodes.active = node
|
||||||
node.location = space.cursor_location
|
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)
|
if (node->id)
|
||||||
id_us_plus(node->id);
|
id_us_plus(node->id);
|
||||||
|
|
||||||
|
if (snode->flag & SNODE_USE_HIDDEN_PREVIEW)
|
||||||
|
node->flag &= ~NODE_PREVIEW;
|
||||||
|
|
||||||
snode_update(snode, node);
|
snode_update(snode, node);
|
||||||
|
|
||||||
if (snode->nodetree->type == NTREE_TEXTURE) {
|
if (snode->nodetree->type == NTREE_TEXTURE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user