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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-09 23:59:52 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-09 23:59:52 +0400
commit25f4fe5d13c76fa8604931f4f61044c26cc29795 (patch)
tree27937ca36dfd1b99d33b72db3dc707d1d2c9c5da
parent2fabd68deb4840ac2112f467d2eaa7efa95fd9da (diff)
RNA: fix for last commit, 0 size arrays are not very useful..
-rw-r--r--source/blender/makesrna/intern/makesrna.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index a3c4af26478..d0c7824dc9d 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -1679,7 +1679,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension) {
+ if(prop->arraydimension && prop->totarraylength) {
fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
for(i=0; i<prop->totarraylength; i++) {
@@ -1699,7 +1699,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension) {
+ if(prop->arraydimension && prop->totarraylength) {
fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
for(i=0; i<prop->totarraylength; i++) {
@@ -1719,7 +1719,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension) {
+ if(prop->arraydimension && prop->totarraylength) {
fprintf(f, "static float rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
for(i=0; i<prop->totarraylength; i++) {
@@ -1762,7 +1762,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %d, ", rna_function_string(bprop->get), rna_function_string(bprop->set), rna_function_string(bprop->getarray), rna_function_string(bprop->setarray), bprop->defaultvalue);
- if(prop->arraydimension) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1775,7 +1775,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_int_print(f, iprop->hardmax); fprintf(f, ", ");
rna_int_print(f, iprop->step); fprintf(f, ", ");
rna_int_print(f, iprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1789,7 +1789,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_float_print(f, fprop->step); fprintf(f, ", ");
rna_int_print(f, (int)fprop->precision); fprintf(f, ", ");
rna_float_print(f, fprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}