[Bf-blender-cvs] [239a74a130b] master: Fix T90065: disable attribute search in places where there is too little context
Jacques Lucke
noreply at git.blender.org
Fri Jul 23 16:13:22 CEST 2021
Commit: 239a74a130bdb917bed8889f518b4aa54a7b96c2
Author: Jacques Lucke
Date: Fri Jul 23 16:13:04 2021 +0200
Branches: master
https://developer.blender.org/rB239a74a130bdb917bed8889f518b4aa54a7b96c2
Fix T90065: disable attribute search in places where there is too little context
Differential Revision: https://developer.blender.org/D12008
===================================================================
M source/blender/editors/space_node/node_templates.cc
===================================================================
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 {
More information about the Bf-blender-cvs
mailing list