Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-07-10 05:57:55 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-10 05:57:55 +0400
commit0051f1be8ea6e329649d4a476e6c4cb5d1d101ef (patch)
treeb96dd939058d529f88a990876e2ec002ea6a0c8f /source/blender/makesrna/intern/makesrna.c
parentd7a7081e633f458d3c68f6ccff5376c0340fe42e (diff)
parent9241559ab4c223d30a949f2e06c776642b69715c (diff)
NLA SoC: Merge from 2.5
21330 to 21469
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r--source/blender/makesrna/intern/makesrna.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 4098ca70356..fe4a809c638 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -1568,22 +1568,20 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
int i, defaultfound= 0;
if(eprop->item) {
- fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {", srna->identifier, strnest, prop->identifier, eprop->totitem);
+ fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {", srna->identifier, strnest, prop->identifier, eprop->totitem+1);
for(i=0; i<eprop->totitem; i++) {
fprintf(f, "{%d, ", eprop->item[i].value);
rna_print_c_string(f, eprop->item[i].identifier); fprintf(f, ", ");
fprintf(f, "%d, ", eprop->item[i].icon);
rna_print_c_string(f, eprop->item[i].name); fprintf(f, ", ");
- rna_print_c_string(f, eprop->item[i].description); fprintf(f, "}");
- if(i != eprop->totitem-1)
- fprintf(f, ", ");
+ rna_print_c_string(f, eprop->item[i].description); fprintf(f, "}, ");
if(eprop->defaultvalue == eprop->item[i].value)
defaultfound= 1;
}
- fprintf(f, "};\n\n");
+ fprintf(f, "{0, NULL, 0, NULL, NULL}};\n\n");
if(!defaultfound) {
fprintf(stderr, "rna_generate_structs: %s%s.%s, enum default is not in items.\n", srna->identifier, errnest, prop->identifier);