diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-03-08 15:38:42 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-03-08 15:47:39 +0300 |
commit | 9ba1ff1c6322cbacaaf7fad057cc507673dcd92d (patch) | |
tree | fd6d84bc60aba44246d21ca4cc68ae732308c60f | |
parent | 1775ea74c152ba7cf27a8bc1f071b40992c89013 (diff) |
Fix T86373: crash picking colors in geometry nodesockets
Caused by {rB85421c4fab02}.
Above commit treated `SOCK_RGBA` and `SOCK_STRING` the same in
`std_node_socket_draw`.
That would turn a RGBA button into a text button (for attribute search),
leading to trouble.
Note these were just treated the same prior to above commit because both
were doing the layout split.
Now just give RGBA sockets their own case.
Maniphest Tasks: T86373
Differential Revision: https://developer.blender.org/D10646
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 977c2053187..a9a7ef5a0a2 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3385,7 +3385,12 @@ static void std_node_socket_draw( } } break; - case SOCK_RGBA: + case SOCK_RGBA: { + uiLayout *row = uiLayoutSplit(layout, 0.5f, false); + uiItemL(row, text, 0); + uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0); + break; + } case SOCK_STRING: { uiLayout *row = uiLayoutSplit(layout, 0.5f, false); uiItemL(row, text, 0); |