Merge branch 'master' into blender2.8
[blender.git] / source / blender / makesrna / intern / makesrna.c
index 7d2ce4cb3b29d7b16cb9ddaad35cc3c9c36864e3..f232a1aef48e13098182852cfe818e2fb9b85f44 100644 (file)
@@ -2583,17 +2583,23 @@ static void rna_generate_blender(BlenderRNA *brna, FILE *f)
 {
        StructRNA *srna;
 
-       fprintf(f, "BlenderRNA BLENDER_RNA = {");
-
+       fprintf(f,
+               "BlenderRNA BLENDER_RNA = {\n"
+               "\t.structs = {"
+       );
        srna = brna->structs.first;
-       if (srna) fprintf(f, "{&RNA_%s, ", srna->identifier);
-       else fprintf(f, "{NULL, ");
+       if (srna) fprintf(f, "&RNA_%s, ", srna->identifier);
+       else      fprintf(f, "NULL, ");
 
        srna = brna->structs.last;
-       if (srna) fprintf(f, "&RNA_%s}", srna->identifier);
-       else fprintf(f, "NULL}");
+       if (srna) fprintf(f, "&RNA_%s},\n", srna->identifier);
+       else      fprintf(f, "NULL},\n");
 
-       fprintf(f, "};\n\n");
+       fprintf(f,
+               "\t.structs_map = NULL,\n"
+               "\t.structs_len = 0,\n"
+               "};\n\n"
+       );
 }
 
 static void rna_generate_property_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f)