e25756cb6299b37abbaaa713b425ffaaed09800c
Previous code would declare properties as `extern PropertyRNA`, but implement them as type-refined data (e.g. `FloatPropertyRNA`). This is fully illegal thing, it happened to work 'fine' so far for two main reasons: * C-linking does not do type-checks on extern data. * Code using these publicly exposed data would always use them as `PorpertyRNA *` pointers, and pass them to RNA API. However, this (finally !) breaks when trying to move generated `RNA_property.h` header to C++, since at least MSVC2022 does mangle the type in the extern'ed symbol name, which makes linking fails epically. This commit fixes the issue by only declaring `PointerRNA *` pointers in the headers. These pointers are then defined in each implementation file (the `rna_xxx_gen.cc` ones), and assinged to the address of a matching local static variable. These static variables are type-refined, and actually contain the property definition data. Pull Request: https://projects.blender.org/blender/blender/pulls/124603
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
