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
This commit is contained in:
2020-12-10 07:58:45 -06:00
parent efb741b280
commit 348bd319d5
9 changed files with 178 additions and 0 deletions

View File

@@ -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
/** \} */

View File

@@ -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();