diff options
author | Hans Goudey <h.goudey@me.com> | 2021-02-12 21:46:17 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-02-12 21:46:17 +0300 |
commit | d7c2c889a688067dab280fc137ad4c3c7ce4cb2b (patch) | |
tree | e7fbfd4e400c3e8eb939946a9ef053a7b0abe545 /source/blender/blenloader | |
parent | ba03f7f0b1d0c40acf997749949a0b0efe19e6d0 (diff) |
Geometry Nodes: Allow attribute nodes to use different domains
Currently every attribute node assumes that the attribute exists on the
"points" domain, so it generally isn't possible to work with attributes
on other domains like edges, polygons, and corners.
This commit adds a heuristic to each attribute node to determine the
correct domain for the result attribute. In general, it works like this:
- If the output attribute already exists, use that domain.
- Otherwise, use the highest priority domain of the input attributes.
- If none of the inputs are attributes, use the default domain (points).
For the implementation I abstracted the check a bit, but in each
node has a slightly different situation, so we end up with slightly
different `get_result_domain` functions in each node. I think this makes
sense, it keeps the code flexible and more easily understandable.
Note that we might eventually want to expose a domain drop-down to some
of the nodes. But that will be a separate discussion; this commit focuses
on making a more useful choice automatically.
Differential Revision: https://developer.blender.org/D10389
Diffstat (limited to 'source/blender/blenloader')
0 files changed, 0 insertions, 0 deletions