diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-10 16:58:45 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-10 16:58:45 +0300 |
commit | 348bd319d5a88f45410a22f8ce2f527d8da48ef0 (patch) | |
tree | 0d89f5816c28893582ba1128e26b6574784841ae /source/blender/blenkernel | |
parent | efb741b280f20cb189e23f2b1335358a95ab609c (diff) |
Geometry Nodes: Attribute Fill Node
This commit adds a node that fills every element of an attribute
with the same value. Currently it supports float, vector, and color
attributes. An immediate use case is for "billboard" scattering.
Currently people are using the same input to a Random Attribute node's
min and max input to fill every element of a vector with the same value,
which is an unintuitive way to accomplish the same thing.
Differential Revision: https://developer.blender.org/D9790
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index a8a94958772..56ed60c1f67 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -1350,6 +1350,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree, #define GEO_NODE_RANDOM_ATTRIBUTE 1008 #define GEO_NODE_ATTRIBUTE_MATH 1009 #define GEO_NODE_JOIN_GEOMETRY 1010 +#define GEO_NODE_ATTRIBUTE_FILL 1011 /** \} */ diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 31de95817fd..ecc17ff0e5e 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -4682,6 +4682,7 @@ static void registerGeometryNodes(void) { register_node_type_geo_group(); + register_node_type_geo_attribute_fill(); register_node_type_geo_triangulate(); register_node_type_geo_edge_split(); register_node_type_geo_transform(); |