Fix/workaround i18n script not finding some messages anymore.

For some reasons(c) some base classes (like `bpy.types.Modifier`) are
not listed anymore by a call to
`bpy.types.ID.__base__.__subclasses__()`, unless they are first accessed
explicitely (e.g. by executing `bpy.types.Modifier` etc.).
This commit is contained in:
Bastien Montagne 2022-04-11 15:32:17 +02:00
parent 883dbfb72f
commit 0d0a45b89d
1 changed files with 7 additions and 0 deletions

View File

@ -424,6 +424,13 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
# Recursively process subclasses.
process_cls_list(cls.__subclasses__())
# FIXME Workaround weird new (blender 3.2) issue where some classes (like `bpy.types.Modifier`)
# are not listed by `bpy.types.ID.__base__.__subclasses__()` until they are accessed from
# `bpy.types` (eg just executing `bpy.types.Modifier`).
cls_dir = dir(bpy.types)
for cls_name in cls_dir:
getattr(bpy.types, cls_name)
# Parse everything (recursively parsing from bpy_struct "class"...).
process_cls_list(bpy.types.ID.__base__.__subclasses__())