From 0eedba328df3cbc326900c34cdfc39b8554ad5ec Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 17 Dec 2020 11:55:45 +0100 Subject: Geometry Nodes: add Attribute Color Ramp node Differential Revision: https://developer.blender.org/D9861 Ref T82585. --- source/blender/editors/space_node/drawnode.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/editors') 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; } } -- cgit v1.2.3