Blender Git Loki

Git Commits -> Revision 89c7c11

Revision 89c7c11 by Hans Goudey (master)
October 14, 2021, 17:43 (GMT)
Geometry Nodes: Create empty components less often

Avoiding creating empty components can be a hassle for code that
interacts with a geometry set. One easy way to do that was calling
the functions that retrieved mutable access to geometry data directly,
like get_mesh_for_write. This commit makes it so that sort of direct
function does not create an empty component if there is no data.

Another way to create an empty component was calling the replace_*
methods with a null pointer. It's more convenient to have a nice API
that handles those cases without creating an empty component.

It's still convenient that the regular get_component_for_write adds
the component if it doesn't exist, because that's often a nice way to
add data to the geometry set.

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

Commit Details:

Full Hash: 89c7c115cebb2ac0aaaeb98eb95decc7b5a129c8
Parent Commit: cddda70
Lines Changed: +67, -22

2 Modified Paths:

/source/blender/blenkernel/BKE_geometry_set.hh (+9, -0) (Diff)
/source/blender/blenkernel/intern/geometry_set.cc (+58, -22) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021