Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-01-26 19:37:58 +0300
committerJacques Lucke <jacques@blender.org>2021-01-26 19:37:58 +0300
commitff7a557c67096fc8de870e5fb43caa17b649c538 (patch)
tree3138d40a331e476d4035c888e268d4605be1b6ba /source/blender/editors/space_node/drawnode.c
parent89484e97548a026d0fdebe4822cb8e94c7209cf3 (diff)
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
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c13
1 files changed, 13 insertions, 0 deletions
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;
}
}