Blender Git Commit Log
Git Commits -> Revision ac25786
Revision ac25786 by Jacques Lucke (geometry-nodes, geometry-nodes-distribute-points, geometry-nodes-mix-attributes, geometry-nodes-point-separate-node, temp-geometry-nodes-distribute-points-cleanup) November 26, 2020, 17:11 (GMT) |
Geometry Nodes: support accessing attributes with spans Before, attributes could only be accessed via setter and getter functions. While this works well, it can be cumbersome and slow. It would be better if most code could just operate on the underlying attribute array directly. The issue is that some attributes are currently not stored in plain arrays (e.g. vertex positions, vertex groups, ...). This patch implements a solution where these "special" attributes are converted into a temporary array for easy access and then copied back into their correct form after all modifications are done. Attribute accessors now have a `get_span` and `apply_span` method, which can be used exactly for that purpose. In the case of attributes that are plain arrays internally, only small constant overhead is added. |
Commit Details:
Full Hash: ac257864a67450da29694ba7fbdc8461aea26a97
Parent Commit: 6d0e92c
Lines Changed: +165, -2