diff options
author | Jacques Lucke <jacques@blender.org> | 2021-07-23 17:13:04 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-07-23 17:13:04 +0300 |
commit | 239a74a130bdb917bed8889f518b4aa54a7b96c2 (patch) | |
tree | 2f5f1eb07242c7e14ed9e1fa1a4f72cb814e901e /source/blender | |
parent | 6ac378e685f357e969abcdd327f2ade95340e814 (diff) |
Fix T90065: disable attribute search in places where there is too little context
Differential Revision: https://developer.blender.org/D12008
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_node/node_templates.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc index cbe33fab64e..648ede7abd5 100644 --- a/source/blender/editors/space_node/node_templates.cc +++ b/source/blender/editors/space_node/node_templates.cc @@ -848,7 +848,10 @@ static void ui_node_draw_input( break; case SOCK_STRING: { const bNodeTree *node_tree = (const bNodeTree *)nodeptr.owner_id; - if (node_tree->type == NTREE_GEOMETRY) { + SpaceNode *snode = CTX_wm_space_node(C); + if (node_tree->type == NTREE_GEOMETRY && snode != nullptr) { + /* Only add the attribute search in the node editor, in other places there is not + * enough context. */ node_geometry_add_attribute_search_button(C, node_tree, node, &inputptr, row); } else { |