Page MenuHome

Geometry Nodes: Store available attribute names in node ui storage.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Feb 18 2021, 1:04 PM.

Details

Summary

There are more sophisticated ways to create a list of available attributes, but this should be a good starting point for an initial implementation.

Ref T85657.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Feb 18 2021, 1:04 PM
Jacques Lucke (JacquesLucke) created this revision.
Jacques Lucke (JacquesLucke) retitled this revision from Geometry Nodes: Store available attribute names in node ui storage (WIP). to Geometry Nodes: Store available attribute names in node ui storage..Feb 19 2021, 12:36 PM
Jacques Lucke (JacquesLucke) edited the summary of this revision. (Show Details)

This makes sense as a first step, one thought inline though.

source/blender/blenkernel/BKE_node_ui_storage.hh
100

Might it make sense to support adding multiple attributes at the same time? Since in practice, this will just union one or two sets/maps with each other.
The argument would then be a reference to the map of attribute data (or a set at first, if we still want to just store the names as a first step).
Theoretically this could then avoid copying completely, for the attributes from the first component.

source/blender/blenkernel/BKE_node_ui_storage.hh
100

Hmm, could be useful, but I wouldn't want to do it right now. I think passing in the attribute names separate might be even more efficient than constructing a separate set. Also note that in the future we might pass more information than just the attribute name (domain, type, ...).

  • use attribute_foreach instead of attribute_names
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/blenkernel/BKE_node_ui_storage.hh
100

Okay, with this version and foreach_attribute there is no temporary set built anyway, so this makes sense!

This revision is now accepted and ready to land.Feb 24 2021, 3:16 PM