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>2017-09-01 12:17:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-01 12:17:14 +0300
commita5cb23c441bcc39cb581674303617ea3a99a4b1c (patch)
tree065152cadac0e01fa753996d9ab8553fc8514b0c /source/blender/makesrna/intern/rna_access.c
parentc843e848921c2361b69dfaeab9c2984069cb7f3b (diff)
parent94b7bf3ec21b02952e994bb10c6e596bdae4720e (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 622483f04d6..114ded9b0c0 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -872,9 +872,17 @@ bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifi
const int len_sep = strlen(sep);
const int len_id = strlen(identifier);
const char *p = strstr(identifier, sep);
+ /* TODO: make error, for now warning until add-ons update. */
+#if 1
+ const int report_level = RPT_WARNING;
+ const bool failure = true;
+#else
+ const int report_level = RPT_ERROR;
+ const bool failure = false;
+#endif
if (p == NULL || p == identifier || p + len_sep >= identifier + len_id) {
- BKE_reportf(reports, RPT_ERROR, "'%s' doesn't contain '%s' with prefix & suffix", identifier, sep);
- return false;
+ BKE_reportf(reports, report_level, "'%s' doesn't contain '%s' with prefix & suffix", identifier, sep);
+ return failure;
}
const char *c, *start, *end, *last;
@@ -886,8 +894,8 @@ bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifi
((c != start) && (*c >= '0' && *c <= '9')) ||
((c != start) && (c != last) && (*c == '_'))) == 0)
{
- BKE_reportf(reports, RPT_ERROR, "'%s' doesn't have upper case alpha-numeric prefix", identifier);
- return false;
+ BKE_reportf(reports, report_level, "'%s' doesn't have upper case alpha-numeric prefix", identifier);
+ return failure;
}
}
@@ -900,8 +908,8 @@ bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifi
(*c >= '0' && *c <= '9') ||
((c != start) && (c != last) && (*c == '_'))) == 0)
{
- BKE_reportf(reports, RPT_ERROR, "'%s' doesn't have an alpha-numeric suffix", identifier);
- return false;
+ BKE_reportf(reports, report_level, "'%s' doesn't have an alpha-numeric suffix", identifier);
+ return failure;
}
}
return true;