Question about blender python extending

Hi everyone,

i’m relative new to python embeding/extending and blender dev in general. i would like to understand how blender automaticaly creates modules where the user has access to the blender objects and functions ? does it uses part of the DNA/RNA parser to auto-generate the bpy module or where does i have to start looking ? i want to understand the hole process and where the parser is located that parses all DNA_* files … i hope you can help me here i’m a bit lost.

best regards,

The DNA headers are parsed in by source/blender/makesdna/intern/makesdna.c, which is then used by the RNA code to wrap it into types and properties that can be accessed by Python, the user interface, animation system, etc.

The Blender Python API code is in source/blender/python. It uses the RNA API to provide access to most Blender data structures, this is in the bpy_rna_* files. Some other parts are wrapped directly.

1 Like