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>2014-01-20 07:11:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-20 07:13:59 +0400
commitece504aff8ed3777498c459d5ce618f99be4df6e (patch)
treef3747d9fab3d60426d8c36ae61a4120120a09687 /source/blender/makesrna/intern/rna_define.c
parent7436a3f4ce2069b7036cc56901f09270686bc0a5 (diff)
Fix for incorrect use of DNA_struct_find_nr
Patch T38290 by ldo (Lawrence D'Oliveiro)
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 044162f7b6e..319e49c5462 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -838,13 +838,17 @@ void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
ds = rna_find_def_struct(srna);
- if (!DNA_struct_find_nr(DefRNA.sdna, structname)) {
+ /* there are far too many structs which initialize without valid DNA struct names,
+ * this can't be checked without adding an option to disable (tested this and it means changes all over - Campbell) */
+#if 0
+ if (DNA_struct_find_nr(DefRNA.sdna, structname) == -1) {
if (!DefRNA.silent) {
fprintf(stderr, "%s: %s not found.\n", __func__, structname);
DefRNA.error = 1;
}
return;
}
+#endif
ds->dnaname = structname;
}
@@ -865,7 +869,7 @@ void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const cha
return;
}
- if (!DNA_struct_find_nr(DefRNA.sdna, structname)) {
+ if (DNA_struct_find_nr(DefRNA.sdna, structname) == -1) {
if (!DefRNA.silent) {
fprintf(stderr, "%s: %s not found.\n", __func__, structname);
DefRNA.error = 1;