RNA Forward Declarations Are Now Generated

Julian Eisel via Bf-committers <[email protected]> Mon, 14 Mar 2022 17:25:02 +0100
Newsgroups gmane.comp.video.blender.devel
Message-ID <[email protected]>
Hi all,

Just a heads up on an RNA change that affects other developers. So far, when defining a new RNA struct, you'd usually also have to add a forward declaration of the generated struct to `RNA_access.h`, something like:

`extern StructRNA RNA_MyNewStruct;`

Makesrna now generates them at compile time, so this isn’t needed anymore. It also generates forward declarations for all RNA properties. We used to add these property declarations manually within functions in a bunch of places, which caused issues with C++ on MSVC.

To access the forward declared RNA structs or properties:  #include “RNA_prototypes.h”

Commits:
- https://developer.blender.org/rB9b298cf3dbec <https://developer.blender.org/rB9b298cf3dbec>
- https://developer.blender.org/rBa5578351c38e <https://developer.blender.org/rBa5578351c38e>

Cheers
- Julian Eisel -

———————————————————————————————————————————
Julian Eisel - [email protected] - www.blender.org
Software Developer
Buikslotermeerplein 161, 1025 ET Amsterdam, the Netherlands
———————————————————————————————————————————
_______________________________________________
Bf-committers mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-committers