Blender Git Loki

Git Commits -> Revision 8e21d52

Revision 8e21d52 by Hans Goudey (master)
September 17, 2021, 01:49 (GMT)
Geometry Nodes: Add a toggle to use attributes as input values

This adds a toggle to node group inputs exposed in the modifier to use
an attribute instead of a single value. When the toggle is pressed, the
button switches to a text button to choose an attribute name. Attribute
search isn't implemented here yet.

One confusing thing is that some values can't be driven by attributes
at all, like the size of a primitive node. In that case, we should have
a node warning, but that will be separate since it's more general.
We can also have an option to turn off this toggle in node group
input settings.

The two new properties for each input are stored with the same name
as the value, but with `"_use_attribute"` and `"_attribute_name"``
suffixes. The properties are not added for socket types that don't
support attribute input, like object sockets.

Differential Revision: https://developer.blender.org/D12504

Commit Details:

Full Hash: 8e21d528cab98447fd072718a649906551de78d9
Parent Commit: 4fa0bbb
Lines Changed: +155, -8

5 Modified Paths:

/source/blender/blenkernel/intern/attribute_access.cc (+3, -1) (Diff)
/source/blender/editors/object/object_intern.h (+1, -0) (Diff)
/source/blender/editors/object/object_modifier.c (+51, -0) (Diff)
/source/blender/editors/object/object_ops.c (+1, -0) (Diff)
/source/blender/modifiers/intern/MOD_nodes.cc (+99, -7) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021