Commit: 94b7bf3ec21b02952e994bb10c6e596bdae4720e
Author: Campbell Barton
Date:   Fri Sep 1 17:06:14 2017 +1000
Branches: master
https://developer.blender.org/rB94b7bf3ec21b02952e994bb10c6e596bdae4720e

RNA: demote non-strict class naming to warning

This stops a lot of add-ons from registering,
while this must be resolved but there no need to force error just now.

===================================================================

M       source/blender/makesrna/intern/rna_access.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_access.c 
b/source/blender/makesrna/intern/rna_access.c
index 09d2d91a51c..bfa1e7cef93 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -855,9 +855,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;
@@ -869,8 +877,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;
                }
        }
 
@@ -883,8 +891,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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to