From fde6625d8d8fdd768d169632ec8487b79cb127fd Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Fri, 12 Sep 2025 21:56:38 +0200 Subject: [PATCH] Cleanup: Reduce size of DupliObject data Shrink from 216 bytes to 208 by reordering the `random_id` field. Saves 32kb for every 4096 block of duplis in the DupliList container. Pull Request: https://projects.blender.org/blender/blender/pulls/145149 --- source/blender/blenkernel/BKE_duplilist.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/BKE_duplilist.hh b/source/blender/blenkernel/BKE_duplilist.hh index 0153adbb8c4..7a263722ce3 100644 --- a/source/blender/blenkernel/BKE_duplilist.hh +++ b/source/blender/blenkernel/BKE_duplilist.hh @@ -48,6 +48,9 @@ struct DupliObject { * objects with motion blur, or inter-update matching for syncing. */ int persistent_id[MAX_DUPLI_RECUR]; + /* Random ID for shading */ + unsigned int random_id; + /* Particle this dupli was generated from. */ ParticleSystem *particle_system; @@ -61,9 +64,6 @@ struct DupliObject { */ int instance_idx[4]; const blender::bke::GeometrySet *instance_data[4]; - - /* Random ID for shading */ - unsigned int random_id; }; using DupliList = blender::VectorList;