Blender Git Loki

Git Commits -> Revision 41f4139

April 22, 2021, 15:35 (GMT)
Geometry Nodes: Get attribute domain and type without allocation

Because we use virtual classes (and for other reasons), we had to do a
small allocation when simply retrieving the data type and domain of an
existing attribute. This happened quite a lot actually-- to determine
these values for result attributes.

This patch adds a simple function to retrieve this meta data without
building the virtual array. This should lower the overhead of every
attribute node, though the difference probably won't be noticible
unless a tree has very many nodes.

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

Commit Details:

Full Hash: 41f413952518edbde113e4a94752401c070c476e
Parent Commit: 79f3678
Committed By: Falk David
Lines Changed: +96, -83

16 Modified Paths:

/source/blender/blenkernel/BKE_geometry_set.hh (+4, -0) (Diff)
/source/blender/blenkernel/intern/attribute_access.cc (+14, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc (+6, -6) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc (+6, -6) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc (+3, -3) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc (+3, -3) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc (+10, -10) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc (+4, -5) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc (+6, -6) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc (+3, -3) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc (+3, -3) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc (+4, -4) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc (+8, -9) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_separate_xyz.cc (+12, -12) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc (+3, -6) (Diff)
/source/blender/nodes/intern/node_geometry_exec.cc (+7, -7) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021