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:
authorCampbell Barton <ideasman42@gmail.com>2011-01-12 09:16:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-12 09:16:15 +0300
commitbaaaceb3eb41381c095f142c790a2c163752cdd5 (patch)
treebf36af6590206f734d826d89af5d79bd5d77d759 /source/blender/makesrna/intern/makesrna.c
parent9a70c609e00f952584a356b4ddc8fa3240438a12 (diff)
comment array/collection skip(), since there was some confusion in this area which caused bugs on index lookups.
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r--source/blender/makesrna/intern/makesrna.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 2036833fa37..cf1b14d5e62 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -948,6 +948,8 @@ static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *
static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc, char *nextfunc)
{
+ /* note on indicies, this is for external functions and ignores skipped values.
+ * so the the index can only be checked against the length when there is no 'skip' funcion. */
char *func;
if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
@@ -984,9 +986,9 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
fprintf(f, " ArrayIterator *internal= iter.internal;\n");
fprintf(f, " if(index < 0 || index >= internal->length) {\n");
fprintf(f, "#ifdef __GNUC__\n");
- fprintf(f, " printf(\"Array iterator out of range: %%s (index %%d range %%d)\\n\", __func__, index, internal->length); \n");
+ fprintf(f, " printf(\"Array iterator out of range: %%s (index %%d)\\n\", __func__, index);\n");
fprintf(f, "#else\n");
- fprintf(f, " printf(\"Array iterator out of range: (index %%d range %%d)\\n\", index, internal->length); \n");
+ fprintf(f, " printf(\"Array iterator out of range: (index %%d)\\n\", index);\n");
fprintf(f, "#endif\n");
fprintf(f, " }\n");
fprintf(f, " else if(internal->skip) {\n");