- include enum names and descriptions in sphinx generated documentation

- add descriptions for operator bl_options
This commit is contained in:
Campbell Barton
2011-09-15 16:15:24 +00:00
parent 2f50579d9a
commit e2818f1b92
6 changed files with 100 additions and 38 deletions

View File

@@ -207,7 +207,7 @@ class InfoPropertyRNA:
self.fixed_type = None
if self.type == "enum":
self.enum_items[:] = rna_prop.enum_items.keys()
self.enum_items[:] = [(item.identifier, item.name, item.description) for item in rna_prop.enum_items]
self.is_enum_flag = rna_prop.is_enum_flag
else:
self.is_enum_flag = False
@@ -264,9 +264,9 @@ class InfoPropertyRNA:
type_str += " in [%s, %s]" % (range_str(self.min), range_str(self.max))
elif self.type == "enum":
if self.is_enum_flag:
type_str += " set in {%s}" % ", ".join(("'%s'" % s) for s in self.enum_items)
type_str += " set in {%s}" % ", ".join(("'%s'" % s[0]) for s in self.enum_items)
else:
type_str += " in [%s]" % ", ".join(("'%s'" % s) for s in self.enum_items)
type_str += " in [%s]" % ", ".join(("'%s'" % s[0]) for s in self.enum_items)
if not (as_arg or as_ret):
# write default property, ignore function args for this