[Bf-blender-cvs] [ab9157e23d5] temp-geometry-nodes-attribute-search: Attribute Search: Attempt to fix disabled button
Hans Goudey
noreply at git.blender.org
Mon Feb 22 21:39:45 CET 2021
Commit: ab9157e23d517d63eb2900893b46261e038b44da
Author: Hans Goudey
Date: Mon Feb 22 14:39:36 2021 -0600
Branches: temp-geometry-nodes-attribute-search
https://developer.blender.org/rBab9157e23d517d63eb2900893b46261e038b44da
Attribute Search: Attempt to fix disabled button
===================================================================
M source/blender/editors/space_node/drawnode.c
===================================================================
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 85375d0cc9b..e57e860f472 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3392,21 +3392,30 @@ static void std_node_socket_draw(
uiBlock *block = uiLayoutGetBlock(row);
- // uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
-
- bNodeSocketValueString *socket_value = (bNodeSocketValueString *)sock->default_value;
-
- char *buffer = MEM_mallocN(256, __func__);
-
- strcpy(buffer, socket_value->value);
-
- // static char search[256] = "WORK";
- // uiBut *but = uiDefButS(
- // block, UI_BTYPE_SEARCH_MENU, 0, "test", 0, 0, 0, 0, NULL, 0.0f, 0.0f, 0.0f, 0.0f, "");
- uiBut *but = uiDefSearchBut(
- block, buffer, 0, ICON_NONE, 256, 10, 10, 200, UI_UNIT_Y, 0, 0, "");
+ // bNodeSocketValueString *socket_value = (bNodeSocketValueString *)sock->default_value;
+ // char *buffer = MEM_mallocN(256, __func__);
+ // strcpy(buffer, socket_value->value);
+ // uiBut *but = uiDefSearchBut(
+ // block, buffer, 0, ICON_NONE, 256, 10, 10, 200, UI_UNIT_Y, 0, 0, "");
+
+ uiBut *but = uiDefIconTextButR(block,
+ UI_BTYPE_SEARCH_MENU,
+ 0,
+ ICON_NONE,
+ NULL,
+ 0,
+ 0,
+ 200,
+ UI_UNIT_Y,
+ ptr,
+ "default_value",
+ 0,
+ 0.0f,
+ 0.0f,
+ 0.0f,
+ 0.0f,
+ "");
button_add_attribute_search(C, node, sock, but);
-
break;
}
case SOCK_OBJECT: {
More information about the Bf-blender-cvs
mailing list