diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-03-13 16:45:08 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-03-13 16:45:08 +0300 |
commit | 47ce2c5574eca221f56420c82d34933d48be0cd5 (patch) | |
tree | 6414838d83927609f3987b0f30c1caba21f33846 /source/blender/makesrna/intern/makesrna.c | |
parent | ec3eec1ac5d1d56ca21047d0d3b4dd78ada4b030 (diff) | |
parent | fc3de690ac0603b566998b8a68b3c38d7767c9b6 (diff) |
Merge branch 'master' into asset-experiments
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index b07620ebb63..98c2016dc51 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3373,7 +3373,9 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const fprintf(f, "#include \"RNA_types.h\"\n"); fprintf(f, "#include \"rna_internal.h\"\n\n"); - rna_generate_prototypes(brna, f); + + /* include the generated prototypes header */ + fprintf(f, "#include \"rna_prototypes_gen.h\"\n\n"); fprintf(f, "#include \"%s\"\n", filename); if (api_filename) @@ -3968,6 +3970,26 @@ static int rna_preprocess(const char *outfile) status = (DefRNA.error != 0); + /* create rna prototype header file */ + strcpy(deffile, outfile); + strcat(deffile, "rna_prototypes_gen.h"); + if (status) { + make_bad_file(deffile, __LINE__); + } + file = fopen(deffile, "w"); + if (!file) { + fprintf(stderr, "Unable to open file: %s\n", deffile); + status = 1; + } + else { + fprintf(file, + "/* Automatically generated function declarations for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n"); + rna_generate_prototypes(brna, file); + fclose(file); + status = (DefRNA.error != 0); + } + /* create rna_gen_*.c files */ for (i = 0; PROCESS_ITEMS[i].filename; i++) { strcpy(deffile, outfile); |