How is the StructRNA used for modifiers?

Hi,

In the ModifierTypeInfo struct (defined for all the modifier files in blender/modifiers/intern/)

the srna field takes (e.g. wireframe modifier) &RNA_WireframeModifier

The only other use I can find of this RNA_WireframeModifier struct is in blender/source/blender/makesrna/RNA_access.h, where it is declared as: extern StructRNA RNA_WireframeModifier;

If I understand correctly, the RNA_WireframeModifier struct is automatically created based on a StructRNA?
and used later on to store runtime data about the modifier?

Thanks :slight_smile:

RNA_WireframeModifier is generated when Blender is build. You can find its definition in the build folder in build_linux/source/blender/makesrna/intern/rna_modifier_gen.c. Just search for StructRNA RNA_WireframeModifier = in that file.