diff options
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/bl_extract_messages.py | 9 | ||||
-rw-r--r-- | release/scripts/modules/bl_previews_utils/bl_previews_render.py | 51 |
2 files changed, 45 insertions, 15 deletions
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 6c9c212387e..49dbac1d502 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -743,7 +743,9 @@ def dump_src_messages(msgs, reports, settings): def clean_str(s): # The encode/decode to/from 'raw_unicode_escape' allows to transform the C-type unicode hexadecimal escapes # (like '\u2715' for the '×' symbol) back into a proper unicode character. - return "".join(m.group("clean") for m in _clean_str(s)).encode('raw_unicode_escape').decode('raw_unicode_escape') + return "".join( + m.group("clean") for m in _clean_str(s) + ).encode('raw_unicode_escape').decode('raw_unicode_escape') def dump_src_file(path, rel_path, msgs, reports, settings): def process_entry(_msgctxt, _msgid): @@ -870,7 +872,10 @@ def dump_messages(do_messages, do_checks, settings): dump_src_messages(msgs, reports, settings) # Get strings from addons' categories. - for uid, label, tip in bpy.types.WindowManager.addon_filter.keywords['items'](bpy.context.window_manager, bpy.context): + for uid, label, tip in bpy.types.WindowManager.addon_filter.keywords['items']( + bpy.context.window_manager, + bpy.context, + ): process_msg(msgs, settings.DEFAULT_CONTEXT, label, "Add-ons' categories", reports, None, settings) if tip: process_msg(msgs, settings.DEFAULT_CONTEXT, tip, "Add-ons' categories", reports, None, settings) diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py index fa3355bd6d5..0b3b3a4e406 100644 --- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -483,19 +483,44 @@ def main(): argv = sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else [] parser = argparse.ArgumentParser( - description="Use Blender to generate previews for currently open Blender file's items.") - parser.add_argument('--clear', default=False, action="store_true", - help="Clear previews instead of generating them.") - parser.add_argument('--no_backups', default=False, action="store_true", - help="Do not generate a backup .blend1 file when saving processed ones.") - parser.add_argument('--no_scenes', default=True, action="store_false", - help="Do not generate/clear previews for scene IDs.") - parser.add_argument('--no_collections', default=True, action="store_false", - help="Do not generate/clear previews for collection IDs.") - parser.add_argument('--no_objects', default=True, action="store_false", - help="Do not generate/clear previews for object IDs.") - parser.add_argument('--no_data_intern', default=True, action="store_false", - help="Do not generate/clear previews for mat/tex/image/etc. IDs (those handled by core Blender code).") + description="Use Blender to generate previews for currently open Blender file's items.", + ) + parser.add_argument( + '--clear', + default=False, + action="store_true", + help="Clear previews instead of generating them.", + ) + parser.add_argument( + '--no_backups', + default=False, + action="store_true", + help="Do not generate a backup .blend1 file when saving processed ones.", + ) + parser.add_argument( + '--no_scenes', + default=True, + action="store_false", + help="Do not generate/clear previews for scene IDs.", + ) + parser.add_argument( + '--no_collections', + default=True, + action="store_false", + help="Do not generate/clear previews for collection IDs.", + ) + parser.add_argument( + '--no_objects', + default=True, + action="store_false", + help="Do not generate/clear previews for object IDs.", + ) + parser.add_argument( + '--no_data_intern', + default=True, + action="store_false", + help="Do not generate/clear previews for mat/tex/image/etc. IDs (those handled by core Blender code).", + ) args = parser.parse_args(argv) orig_save_version = bpy.context.preferences.filepaths.save_version |