diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-20 03:05:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-20 03:05:21 +0400 |
commit | aa0aac706e4381624482978110a54b5959414d14 (patch) | |
tree | 6ddf414bdcc52d7da10e2d7e621113aec48520dc /source/blender/makesrna/intern/makesrna.c | |
parent | 7349d775b0c80a112cc90888db80f481a36c4b92 (diff) |
2.5
* Optimized RNA property lookups and path resolving, still can be
much better, but now the 1000 IPO example on bf-taskforce25
runs at reasonable speed.
* Also an optimization in the depsgraph when dealing with many
objects, this was actually also a bottleneck here.
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index c8273513711..75293d83346 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1488,8 +1488,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr if(nest != NULL) { len= strlen(nest); - strnest= MEM_mallocN(sizeof(char)*(len+1), "rna_generate_property -> strnest"); - errnest= MEM_mallocN(sizeof(char)*(len+1), "rna_generate_property -> errnest"); + strnest= MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> strnest"); + errnest= MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> errnest"); strcpy(strnest, "_"); strcat(strnest, nest); strcpy(errnest, "."); strcat(errnest, nest); @@ -1713,6 +1713,8 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) if(func->cont.prev) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func,\n", srna->identifier, ((FunctionRNA*)func->cont.prev)->identifier); else fprintf(f, "NULL,\n"); + fprintf(f, "\tNULL,\n"); + parm= func->cont.properties.first; if(parm) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s_%s, ", srna->identifier, func->identifier, parm->identifier); else fprintf(f, "\t{NULL, "); @@ -1744,6 +1746,8 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) if(srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA*)srna->cont.prev)->identifier); else fprintf(f, "NULL,\n"); + fprintf(f, "\tNULL,\n"); + prop= srna->cont.properties.first; if(prop) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s, ", srna->identifier, prop->identifier); else fprintf(f, "\t{NULL, "); |