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:
authorCampbell Barton <campbell@blender.org>2022-04-19 06:04:35 +0300
committerCampbell Barton <campbell@blender.org>2022-04-19 06:08:48 +0300
commit775f0d76d55b2977c30dcd0f9306437ae520d63f (patch)
tree784c77f6c742446051334e2858aa845492684a98
parent7e045094c1c6f7108833afe88f866572d0bd6d93 (diff)
Fix missing C/Python methods in API docs
The following methods weren't included in API docs. - BlendDataLibraries.load - BlendDataLibraries.write - Text.region_as_string - Text.region_from_string
-rw-r--r--release/scripts/modules/rna_info.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index a8814759840..b009cc4fefe 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -198,7 +198,11 @@ class InfoStructRNA:
for identifier, attr in self._get_py_visible_attrs():
# methods may be python wrappers to C functions
attr_func = getattr(attr, "__func__", attr)
- if type(attr_func) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
+ if (
+ (type(attr_func) in {types.BuiltinMethodType, types.BuiltinFunctionType}) or
+ # Without the `objclass` check, many inherited methods are included.
+ (type(attr_func) == types.MethodDescriptorType and attr_func.__objclass__ == self.py_class)
+ ):
functions.append((identifier, attr))
return functions