diff options
author | Hans Goudey <h.goudey@me.com> | 2021-10-27 16:54:24 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-10-27 16:54:24 +0300 |
commit | 212b02b5488982e83083a033150d11384181aa49 (patch) | |
tree | 6ec5657a695ff13d7fb9a9025e454cf44dfc869c /source/blender/modifiers | |
parent | b6bed63b5bae9f64959e3c03b1f6f6cf7c091163 (diff) |
Geometry Nodes: Show hint in empty output attributes panel
This is meant to add something to the sub-panel when it is empty
so it looks more purposeful, but also add a hint that might be helpful
when figuring out how to output a named attribute.
Differential Revision: https://developer.blender.org/D12715
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 292ba04490c..c88940c00c2 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -1428,13 +1428,18 @@ static void output_attribute_panel_draw(const bContext *UNUSED(C), Panel *panel) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, true); + bool has_output_attribute = false; if (nmd->node_group != nullptr && nmd->settings.properties != nullptr) { LISTBASE_FOREACH (bNodeSocket *, socket, &nmd->node_group->outputs) { if (socket_type_has_attribute_toggle(*socket)) { + has_output_attribute = true; draw_property_for_output_socket(layout, *nmd, ptr, *socket); } } } + if (!has_output_attribute) { + uiItemL(layout, IFACE_("No group output attributes connected."), ICON_INFO); + } } static void panelRegister(ARegionType *region_type) |