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 <ideasman42@gmail.com>2010-01-02 21:55:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-02 21:55:07 +0300
commitcef8b2088f18ca4394f8aa25fa23ee28bb327a77 (patch)
tree39374fab987462d27f1f437497ebcc365bb734a0 /release/scripts/modules/rna_info.py
parent78b2eb8d3c1e328d0e932b9b285d8cbf20e9cfc2 (diff)
sphinx support for documenting multiple return values
Diffstat (limited to 'release/scripts/modules/rna_info.py')
-rw-r--r--release/scripts/modules/rna_info.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 86da0b56943..5d7bd5af70a 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -252,19 +252,22 @@ class InfoFunctionRNA:
self.description = rna_func.description.strip()
self.args = []
- self.return_value = None
+ self.return_values = ()
def build(self):
rna_func = self.bl_func
parent_id = rna_func
+ self.return_values = []
for rna_prop in rna_func.parameters.values():
prop = GetInfoPropertyRNA(rna_prop, parent_id)
if rna_prop.use_return:
- self.return_value = prop
+ self.return_values.append(prop)
else:
self.args.append(prop)
+ self.return_values = tuple(self.return_values)
+
def __repr__(self):
txt = ''
txt += ' * ' + self.identifier + '('
@@ -566,8 +569,8 @@ def BuildRNAInfo():
func.build()
for prop in func.args:
prop.build()
- if func.return_value:
- func.return_value.build()
+ for prop in func.return_values:
+ prop.build()
# now for operators
op_mods = dir(bpy.ops)