RNA: error on register when classes use invalid identifiers

Ensure conventions are met since we're in beta and all instances should
be updated before release.
This commit is contained in:
Campbell Barton 2019-03-25 14:39:55 +11:00
parent 2ed3fbf106
commit b24a255ca6
Notes: blender-bot 2023-02-14 03:13:26 +01:00
Referenced by commit db4a522249, Revert "RNA: error on register when classes use invalid identifiers"
Referenced by issue #62959, Enabling addons gives RuntimeError
1 changed files with 0 additions and 6 deletions

View File

@ -1017,14 +1017,8 @@ 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, report_level, "'%s' doesn't contain '%s' with prefix & suffix", identifier, sep);
return failure;