diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 1 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
4 files changed, 11 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 961ab08efdd..40fe9be9135 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -236,6 +236,7 @@ class NODE_PT_quality(bpy.types.Panel): layout.prop(tree, "use_opencl") layout.prop(tree, "two_pass") layout.prop(snode, "show_highlight") + layout.prop(snode, "use_hidden_preview") class NODE_MT_node_color_presets(Menu): diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index c04bcdac142..b3ef4561b72 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -2589,6 +2589,10 @@ bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, bNodeTemplate if (node->id) id_us_plus(node->id); + + if (snode->flag & SNODE_USE_HIDDEN_PREVIEW) + node->flag &= ~NODE_PREVIEW; + snode_update(snode, node); } diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index ca2917cb03b..b9603e2cdb1 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -903,6 +903,7 @@ typedef enum eSpaceNode_Flag { SNODE_SHOW_B = (1 << 9), SNODE_AUTO_RENDER = (1 << 5), SNODE_SHOW_HIGHLIGHT = (1 << 6), + SNODE_USE_HIDDEN_PREVIEW = (1 << 10), } eSpaceNode_Flag; /* snode->texfrom */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 74780faa700..74f6b16a111 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2989,6 +2989,11 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_SHOW_HIGHLIGHT); RNA_def_property_ui_text(prop, "Highlight", "Highlight nodes that are being calculated"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); + + prop = RNA_def_property(srna, "use_hidden_preview", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_USE_HIDDEN_PREVIEW); + RNA_def_property_ui_text(prop, "Hide Preview", "Hide preview for newly creating nodes"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); } static void rna_def_space_logic(BlenderRNA *brna) |