diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-23 04:43:47 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-23 05:37:28 +0300 |
commit | 1e882b86579b7aea76fd81ee121949e03c7599be (patch) | |
tree | 94fb4a3491a97f75aeb50ed816652ae7e84eb002 /release/scripts/modules | |
parent | 4d509fd6e14c475a2318ca37ba81ed04f7028ec1 (diff) |
PyDoc: quiet output and minor cleanup
Suppress printing unnecessary output when generating docs.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/rna_info.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 76b59e4e816..04120508df5 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -585,6 +585,16 @@ def BuildRNAInfo(): structs = [] def _bpy_types_iterator(): + # Don't report when these types are ignored. + suppress_warning = { + "bpy_func", + "bpy_prop", + "bpy_prop_array", + "bpy_prop_collection", + "bpy_struct", + "bpy_struct_meta_idprop", + } + names_unique = set() rna_type_list = [] for rna_type_name in dir(bpy.types): @@ -594,8 +604,13 @@ def BuildRNAInfo(): if rna_struct is not None: rna_type_list.append(rna_type) yield (rna_type_name, rna_struct) + elif rna_type_name.startswith("_"): + # Ignore "__dir__", "__getattr__" .. etc. + pass + elif rna_type_name in suppress_warning: + pass else: - print("Ignoring", rna_type_name) + print("rna_info.BuildRNAInfo(..): ignoring type", repr(rna_type_name)) # Now, there are some sub-classes in add-ons we also want to include. # Cycles for e.g. these are referenced from the Scene, but not part of |