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:
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/rna_info.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 6f4b63fc99a..bf15b472805 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -148,7 +148,9 @@ class InfoStructRNA:
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in {types.FunctionType, types.MethodType}:
+ # methods may be python wrappers to C functions
+ attr_func = getattr(attr, "__func__", attr)
+ if type(attr_func) in {types.FunctionType, types.MethodType}:
functions.append((identifier, attr))
return functions
@@ -156,7 +158,9 @@ class InfoStructRNA:
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
+ # methods may be python wrappers to C functions
+ attr_func = getattr(attr, "__func__", attr)
+ if type(attr_func) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
functions.append((identifier, attr))
return functions