diff options
author | Jacques Lucke <jacques@blender.org> | 2021-02-05 18:20:14 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-02-05 18:20:14 +0300 |
commit | 16abe9343a5e01426e85e4bb9d0e95c3217e35ea (patch) | |
tree | 2dc86e6324a2f8bdf12403d1bdf7d2b39a3129d0 /source/blender/editors/space_node | |
parent | 46e0efb462cb92e9ade39588b51391820491aed8 (diff) |
Geometry Nodes: add Volume to Mesh node
This node takes a volume and generates a mesh on it's "surface".
The surface is defined by a threshold value.
Currently, the node only works on volumes generated by the
Points to Volume node. This limitation will be resolved soonish.
Ref T84605.
Differential Revision: https://developer.blender.org/D10243
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 7d0ff2331d0..132dcd8a9fb 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3389,6 +3389,15 @@ static void node_geometry_buts_attribute_proximity(uiLayout *layout, uiItemR(layout, ptr, "target_geometry_element", DEFAULT_FLAGS, "", ICON_NONE); } +static void node_geometry_buts_volume_to_mesh(uiLayout *layout, + bContext *UNUSED(C), + PointerRNA *ptr) +{ + uiLayoutSetPropSep(layout, true); + uiLayoutSetPropDecorate(layout, false); + uiItemR(layout, ptr, "resolution_mode", DEFAULT_FLAGS, IFACE_("Resolution"), ICON_NONE); +} + static void node_geometry_set_butfunc(bNodeType *ntype) { switch (ntype->type) { @@ -3455,6 +3464,9 @@ static void node_geometry_set_butfunc(bNodeType *ntype) case GEO_NODE_ATTRIBUTE_PROXIMITY: ntype->draw_buttons = node_geometry_buts_attribute_proximity; break; + case GEO_NODE_VOLUME_TO_MESH: + ntype->draw_buttons = node_geometry_buts_volume_to_mesh; + break; } } |