From a5578351c38e2b2bb45d940a2fc57354e5fe3a5e Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 14 Mar 2022 16:54:46 +0100 Subject: Auto-generate RNA-structs declarations in `RNA_prototypes.h` So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton --- source/blender/freestyle/CMakeLists.txt | 6 ++++++ .../freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp | 1 + source/blender/freestyle/intern/python/BPy_Freestyle.cpp | 1 + 3 files changed, 8 insertions(+) (limited to 'source/blender/freestyle') diff --git a/source/blender/freestyle/CMakeLists.txt b/source/blender/freestyle/CMakeLists.txt index 8276d503a3b..2a5a2d0d957 100644 --- a/source/blender/freestyle/CMakeLists.txt +++ b/source/blender/freestyle/CMakeLists.txt @@ -552,6 +552,9 @@ set(INC ../render/intern ../../../extern/glew/include ../../../intern/guardedalloc + + # RNA_prototypes.h + ${CMAKE_BINARY_DIR}/source/blender/makesrna ) set(INC_SYS @@ -577,3 +580,6 @@ blender_add_lib(bf_freestyle "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") if(COMMAND target_precompile_headers) target_precompile_headers(bf_freestyle PRIVATE FRS_precomp.h) endif() + +# RNA_prototypes.h +add_dependencies(bf_freestyle bf_rna) diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 25a1118393e..54a6bb44bad 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -12,6 +12,7 @@ #include "MEM_guardedalloc.h" #include "RNA_access.h" +#include "RNA_prototypes.h" #include "RNA_types.h" #include "DNA_camera_types.h" diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index fccb43d5e80..63585df97a9 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -43,6 +43,7 @@ extern "C" { #include "DNA_scene_types.h" #include "FRS_freestyle.h" #include "RNA_access.h" +#include "RNA_prototypes.h" #include "bpy_rna.h" /* pyrna_struct_CreatePyObject() */ static char Freestyle_getCurrentScene___doc__[] = -- cgit v1.2.3