From ff7a557c67096fc8de870e5fb43caa17b649c538 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 26 Jan 2021 17:37:58 +0100 Subject: Geometry Nodes: new Points to Volume node This implements a new geometry node based on T84606. It is the first node that generates a `VolumeComponent`. Differential Revision: https://developer.blender.org/D10169 --- source/blender/editors/space_node/drawnode.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '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 afd19df9f14..8f3602c8d50 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3297,6 +3297,16 @@ static void node_geometry_buts_attribute_sample_texture(uiLayout *layout, uiTemplateID(layout, C, ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL); } +static void node_geometry_buts_points_to_volume(uiLayout *layout, + bContext *UNUSED(C), + PointerRNA *ptr) +{ + uiLayoutSetPropSep(layout, true); + uiLayoutSetPropDecorate(layout, false); + uiItemR(layout, ptr, "resolution_mode", DEFAULT_FLAGS, IFACE_("Resolution"), ICON_NONE); + uiItemR(layout, ptr, "input_type_radius", DEFAULT_FLAGS, IFACE_("Radius"), ICON_NONE); +} + static void node_geometry_set_butfunc(bNodeType *ntype) { switch (ntype->type) { @@ -3354,6 +3364,9 @@ static void node_geometry_set_butfunc(bNodeType *ntype) case GEO_NODE_ATTRIBUTE_SAMPLE_TEXTURE: ntype->draw_buttons = node_geometry_buts_attribute_sample_texture; break; + case GEO_NODE_POINTS_TO_VOLUME: + ntype->draw_buttons = node_geometry_buts_points_to_volume; + break; } } -- cgit v1.2.3