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
This commit is contained in:
Jesse Yurkovich
2025-09-12 21:56:38 +02:00
committed by Jesse Yurkovich
parent f43566f8bc
commit fde6625d8d

View File

@@ -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<DupliObject>;