Cleanup: remove check for non-annotation properties in classes

This was added to assist upgrading scripts to Blender 2.8x,
now 2.9x is released there is no need to keep this block.
This commit is contained in:
Campbell Barton 2021-02-18 15:45:08 +11:00
parent 9df9269173
commit afa5da9ce0
Notes: blender-bot 2023-02-14 18:34:40 +01:00
Referenced by issue #88152, Regression when accessing python prop defined in AddonPreferences
Referenced by issue blender/blender-addons#89910, Rigify UI throws an error ('thigh_fk' cannot be found)
1 changed files with 0 additions and 25 deletions

View File

@ -7977,31 +7977,6 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict)
}
}
if (ret == 0) {
/* This block can be removed once 2.8x is released and annotations are in use. */
bool has_warning = false;
while (PyDict_Next(class_dict, &pos, &key, &item)) {
if (pyrna_is_deferred_prop(item)) {
if (!has_warning) {
printf(
"Warning: class %.200s "
"contains a property which should be an annotation!\n",
RNA_struct_identifier(srna));
PyC_LineSpit();
has_warning = true;
}
printf(" assign as a type annotation: %.200s.%.200s\n",
RNA_struct_identifier(srna),
PyUnicode_AsUTF8(key));
}
ret = deferred_register_prop(srna, key, item);
if (ret != 0) {
break;
}
}
}
return ret;
}