[Bf-blender-cvs] [0d0a45b89d5] master: Fix/workaround i18n script not finding some messages anymore.
Bastien Montagne
noreply at git.blender.org
Mon Apr 11 15:46:03 CEST 2022
Commit: 0d0a45b89d5144e0715df55f39e25e9a0253a7cf
Author: Bastien Montagne
Date: Mon Apr 11 15:32:17 2022 +0200
Branches: master
https://developer.blender.org/rB0d0a45b89d5144e0715df55f39e25e9a0253a7cf
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.).
===================================================================
M release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
===================================================================
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index 58461309720..87d54213d1b 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -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__())
More information about the Bf-blender-cvs
mailing list