diff options
author | Hans Goudey <h.goudey@me.com> | 2021-01-07 18:27:42 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-01-07 18:27:42 +0300 |
commit | 3db975f30dd327381dc1a0e08305460a1a12eba4 (patch) | |
tree | f6e2f3a004e8a7c6b055af8c56652ae707ab942e /source/blender/blenkernel/BKE_geometry_set.h | |
parent | 4c0fc60105d7b7ff3f5c926510d77bb261e71977 (diff) |
Fix T84326: No ID for geometry nodes instances after scattering
Instances are created with an "index" parameter used for persistence over
time through animation. Currently the geometry nodes instancer passes
the index in the array for this value, but the arrays created by the
"Point Distribution" node aren't necessarily stable in this way when
the input mesh is deformed. In D9832 we already mostly solved this
problem with an `id` attribute. The solution here is to create instances
with this attribute as well.
It's important to note that deforming the instanced points *after*
distribution will usually be a better solution for this problem. This
solution is likely still important though.
Differential Revision: https://developer.blender.org/D10024
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.h')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.h b/source/blender/blenkernel/BKE_geometry_set.h index 37a3ed82bb8..5b8273def66 100644 --- a/source/blender/blenkernel/BKE_geometry_set.h +++ b/source/blender/blenkernel/BKE_geometry_set.h @@ -49,6 +49,7 @@ int BKE_geometry_set_instances(const struct GeometrySet *geometry_set, float (**r_positions)[3], float (**r_rotations)[3], float (**r_scales)[3], + int **r_ids, struct InstancedData **r_instanced_data); #ifdef __cplusplus |