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-17 23:59:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-17 23:59:35 +0300
commit381e926600adde8271ddec79affbe4ef0d7faaf0 (patch)
tree5744fd38981ea6f99aff97952252c5b0c009de52 /release/scripts/modules
parentf50ec12d9f1193a2f511f193734c800d750e0897 (diff)
fixed sphinx doc generator
- arguments, return values indentation means they get correctly interpreted by sphinx - functions with no return values were displaying return as () - return values were getting the '(optional)' added in some cases. Example: http://www.blender.org/documentation/250PythonDoc/bpy.ops.object.html
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/rna_info.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 5d7bd5af70a..1cdae79f439 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -201,7 +201,7 @@ class InfoPropertyRNA:
return "%s=%s" % (self.identifier, default)
return self.identifier
- def get_type_description(self, as_arg=False, class_fmt="%s"):
+ def get_type_description(self, as_ret=False, as_arg=False, class_fmt="%s"):
type_str = ""
if self.fixed_type is None:
type_str += self.type
@@ -223,7 +223,9 @@ class InfoPropertyRNA:
type_str += collection_str + (class_fmt % self.fixed_type.identifier)
- if as_arg:
+ if as_ret:
+ pass
+ elif as_arg:
if not self.is_required:
type_str += ", (optional)"
else: # readonly is only useful for selfs, not args