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>2020-12-17 13:55:45 +0300
committerJacques Lucke <jacques@blender.org>2020-12-17 13:56:18 +0300
commit0eedba328df3cbc326900c34cdfc39b8554ad5ec (patch)
tree866fc2d31df07f6d3059cbf3b64c6492268def9b /source/blender/editors
parent2945c1e3e55ee12c90464246977de17d28870eb8 (diff)
Geometry Nodes: add Attribute Color Ramp node
Differential Revision: https://developer.blender.org/D9861 Ref T82585.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/drawnode.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 2857c08cad6..45f3b6cf9c9 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3215,6 +3215,13 @@ static void node_geometry_buts_attribute_point_distribute(uiLayout *layout,
uiItemR(layout, ptr, "distribute_method", DEFAULT_FLAGS, "", ICON_NONE);
}
+static void node_geometry_buts_attribute_color_ramp(uiLayout *layout,
+ bContext *UNUSED(C),
+ PointerRNA *ptr)
+{
+ uiTemplateColorRamp(layout, ptr, "color_ramp", 0);
+}
+
static void node_geometry_set_butfunc(bNodeType *ntype)
{
switch (ntype->type) {
@@ -3245,6 +3252,9 @@ static void node_geometry_set_butfunc(bNodeType *ntype)
case GEO_NODE_POINT_DISTRIBUTE:
ntype->draw_buttons = node_geometry_buts_attribute_point_distribute;
break;
+ case GEO_NODE_ATTRIBUTE_COLOR_RAMP:
+ ntype->draw_buttons = node_geometry_buts_attribute_color_ramp;
+ break;
}
}