diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-18 08:32:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-18 08:32:29 +0400 |
commit | dc4cded2c22656828499831f13471506ed59fc0a (patch) | |
tree | 8ec8f241d0fbae7e2d9401bcd43f3d1b92e5e3ca /release/scripts | |
parent | 9d6f05edb810ed06b7d1a48c7c00cd6e62956d5f (diff) |
fix for missing attribute is_argument_optional when generating docs.
also use __slots__ for classes.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/rna_info.py | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 804055e61a5..a4fd2c996cb 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -83,8 +83,21 @@ def float_as_string(f): class InfoStructRNA: - global_lookup = {} + __slots__ = ( + "bl_rna", + "identifier", + "name", + "description", + "base", + "nested", + "full_path", + "functions", + "children", + "references", + "properties", + ) + global_lookup = {} def __init__(self, rna_type): self.bl_rna = rna_type @@ -182,6 +195,27 @@ class InfoStructRNA: class InfoPropertyRNA: + __slots__ = ( + "bl_prop", + "srna", + "identifier", + "name", + "description", + "default_str", + "default", + "enum_items", + "min", + "max", + "array_length", + "collection_type", + "type", + "fixed_type", + "is_argument_optional", + "is_enum_flag", + "is_required", + "is_readonly", + "is_never_none", + ) global_lookup = {} def __init__(self, rna_prop): @@ -202,6 +236,7 @@ class InfoPropertyRNA: self.is_required = rna_prop.is_required self.is_readonly = rna_prop.is_readonly self.is_never_none = rna_prop.is_never_none + self.is_argument_optional = rna_prop.is_argument_optional self.type = rna_prop.type.lower() fixed_type = getattr(rna_prop, "fixed_type", "") @@ -318,6 +353,14 @@ class InfoPropertyRNA: class InfoFunctionRNA: + __slots__ = ( + "bl_func", + "identifier", + "description", + "args", + "return_values", + "is_classmethod", + ) global_lookup = {} def __init__(self, rna_func): @@ -355,6 +398,15 @@ class InfoFunctionRNA: class InfoOperatorRNA: + __slots__ = ( + "bl_op", + "identifier", + "name", + "module_name", + "func_name", + "description", + "args", + ) global_lookup = {} def __init__(self, rna_op): |