Hey there!
Im a bit puzzled with struct padding for the various ModifierData structs in DNA_modifier_types.
When I add, i.e. a short to a struct and try to align the padding for it, everything breaks when I compile. Lots of errors.
This is what I read up: Structure Member Alignment, Padding and Data Packing - GeeksforGeeks
And this already raises questions, i.e. what are we aligning for, 4 or 8 bytes ?
It should be obvious when I fiddle around long enough and analyze all the other ModifierData structs, but I have so many more questions to this topic that I cant yet draw certain conclusions. If that makes sense.
How do I count byte size for structs inside the ModifierData structs?
They are already packed locally, so can I ignore them for counting?
Still matters where I put them, correct ?
My specific goal is to make the custom-curve influence falloff for the WeightVGProximityModifier available, for that I need to add the struct:
struct CurveMapping *cmap_curve;
in DNA_modifier_types.h => WeightVGProximityModifierData.
But where to put it and how to pad ?
original padding:
char _pad0[2];
Thanks in advance!