Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-11-03 20:07:36 +0300
committerJulian Eisel <julian@blender.org>2021-11-03 20:07:36 +0300
commite10caf6fe3c23def05d35c5a5bad58165cfa77fd (patch)
tree16a6a32de4c75fc8143b1fe97f31633b646dd6f6 /release
parenta7672caeb255e3c47071edfa42ef9805b64fca0b (diff)
parenta827864e6b1ee34af759dea61f832076c0e67c44 (diff)
Merge remote-tracking branch 'origin/blender-v3.0-release'
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py37
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils_spell_check.py6
-rw-r--r--release/scripts/startup/bl_operators/file.py8
3 files changed, 44 insertions, 7 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 49dbac1d502..00edd7d523d 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -252,27 +252,50 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
# Function definitions
def walk_properties(cls):
+ # This handles properties whose name is the same as their identifier.
+ # Usually, it means that those are internal properties not exposed in the UI, however there are some cases
+ # where the UI label is actually defined and same as the identifier (color spaces e.g., `RGB` etc.).
+ # So we only exclude those properties in case they belong to an operator for now.
+ def prop_name_validate(cls, prop_name, prop_identifier):
+ if prop_name != prop_identifier:
+ return True
+ # Heuristic: A lot of operator's HIDDEN properties have no UI label/description.
+ # While this is not ideal (for API doc purposes, description should always be provided),
+ # for now skip those properties.
+ # NOTE: keep in sync with C code in ui_searchbox_region_draw_cb__operator().
+ if issubclass(cls, bpy.types.OperatorProperties) and "_OT_" in cls.__name__:
+ return False
+ # Heuristic: If UI label is not capitalized, it is likely a private (undocumented) property,
+ # that can be skipped.
+ if prop_name and not prop_name[0].isupper():
+ return False
+ return True
+
bl_rna = cls.bl_rna
# Get our parents' properties, to not export them multiple times.
bl_rna_base = bl_rna.base
+ bl_rna_base_props = set()
if bl_rna_base:
- bl_rna_base_props = set(bl_rna_base.properties.values())
- else:
- bl_rna_base_props = set()
+ bl_rna_base_props |= set(bl_rna_base.properties.values())
+ for cls_base in cls.__bases__:
+ bl_rna_base = getattr(cls_base, "bl_rna", None)
+ if not bl_rna_base:
+ continue
+ bl_rna_base_props |= set(bl_rna_base.properties.values())
props = sorted(bl_rna.properties, key=lambda p: p.identifier)
for prop in props:
# Only write this property if our parent hasn't got it.
if prop in bl_rna_base_props:
continue
- if prop.identifier == "rna_type":
+ if prop.identifier in {"rna_type", "bl_icon", "icon"}:
continue
reports["rna_props"].append((cls, prop))
msgsrc = "bpy.types.{}.{}".format(bl_rna.identifier, prop.identifier)
msgctxt = prop.translation_context or default_context
- if prop.name and (prop.name != prop.identifier or msgctxt != default_context):
+ if prop.name and prop_name_validate(cls, prop.name, prop.identifier):
process_msg(msgs, msgctxt, prop.name, msgsrc, reports, check_ctxt_rna, settings)
if prop.description:
process_msg(msgs, default_context, prop.description, msgsrc, reports, check_ctxt_rna_tip, settings)
@@ -282,7 +305,7 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
for item in prop.enum_items:
msgsrc = "bpy.types.{}.{}:'{}'".format(bl_rna.identifier, prop.identifier, item.identifier)
done_items.add(item.identifier)
- if item.name and item.name != item.identifier:
+ if item.name and prop_name_validate(cls, item.name, item.identifier):
process_msg(msgs, msgctxt, item.name, msgsrc, reports, check_ctxt_rna, settings)
if item.description:
process_msg(msgs, default_context, item.description, msgsrc, reports, check_ctxt_rna_tip,
@@ -292,7 +315,7 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
continue
msgsrc = "bpy.types.{}.{}:'{}'".format(bl_rna.identifier, prop.identifier, item.identifier)
done_items.add(item.identifier)
- if item.name and item.name != item.identifier:
+ if item.name and prop_name_validate(cls, item.name, item.identifier):
process_msg(msgs, msgctxt, item.name, msgsrc, reports, check_ctxt_rna, settings)
if item.description:
process_msg(msgs, default_context, item.description, msgsrc, reports, check_ctxt_rna_tip,
diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
index 6baf5129dd7..62186655326 100644
--- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
+++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
@@ -689,11 +689,13 @@ class SpellChecker:
"ctrl",
"cw", "ccw",
"dev",
+ "dls",
"djv",
"dpi",
"dvar",
"dx",
"eo",
+ "ewa",
"fh",
"fk",
"fov",
@@ -733,6 +735,7 @@ class SpellChecker:
"rhs",
"rv",
"sdl",
+ "sdls",
"sl",
"smpte",
"ssao",
@@ -767,6 +770,7 @@ class SpellChecker:
"svbvh",
# Files types/formats
+ "aac",
"avi",
"attrac",
"autocad",
@@ -789,6 +793,7 @@ class SpellChecker:
"ico",
"jpg", "jpeg", "jpegs",
"json",
+ "lzw",
"matroska",
"mdd",
"mkv",
@@ -798,6 +803,7 @@ class SpellChecker:
"openjpeg",
"osl",
"oso",
+ "pcm",
"piz",
"png", "pngs",
"po",
diff --git a/release/scripts/startup/bl_operators/file.py b/release/scripts/startup/bl_operators/file.py
index 672a4170325..4c53279427a 100644
--- a/release/scripts/startup/bl_operators/file.py
+++ b/release/scripts/startup/bl_operators/file.py
@@ -43,22 +43,30 @@ class WM_OT_previews_batch_generate(Operator):
files: CollectionProperty(
type=OperatorFileListElement,
options={'HIDDEN', 'SKIP_SAVE'},
+ name="",
+ description="Collection of file paths with common `directory` root",
)
directory: StringProperty(
maxlen=1024,
subtype='FILE_PATH',
options={'HIDDEN', 'SKIP_SAVE'},
+ name="",
+ description="Root path of all files listed in `files` collection",
)
# Show only images/videos, and directories!
filter_blender: BoolProperty(
default=True,
options={'HIDDEN', 'SKIP_SAVE'},
+ name="",
+ description="Show Blender files in the File Browser",
)
filter_folder: BoolProperty(
default=True,
options={'HIDDEN', 'SKIP_SAVE'},
+ name="",
+ description="Show folders in the File Browser",
)
# -----------