[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60215] trunk/blender/release/scripts/ modules/rna_info.py: fix for missing attribute is_argument_optional when generating docs.

Campbell Barton ideasman42 at gmail.com
Wed Sep 18 06:32:29 CEST 2013


Revision: 60215
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60215
Author:   campbellbarton
Date:     2013-09-18 04:32:29 +0000 (Wed, 18 Sep 2013)
Log Message:
-----------
fix for missing attribute is_argument_optional when generating docs.
also use __slots__ for classes.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/rna_info.py

Modified: trunk/blender/release/scripts/modules/rna_info.py
===================================================================
--- trunk/blender/release/scripts/modules/rna_info.py	2013-09-18 01:33:40 UTC (rev 60214)
+++ trunk/blender/release/scripts/modules/rna_info.py	2013-09-18 04:32:29 UTC (rev 60215)
@@ -83,8 +83,21 @@
 
 
 class InfoStructRNA:
+    __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 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 @@
         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 InfoFunctionRNA:
+    __slots__ = (
+        "bl_func",
+        "identifier",
+        "description",
+        "args",
+        "return_values",
+        "is_classmethod",
+        )
     global_lookup = {}
 
     def __init__(self, rna_func):
@@ -355,6 +398,15 @@
 
 
 class InfoOperatorRNA:
+    __slots__ = (
+        "bl_op",
+        "identifier",
+        "name",
+        "module_name",
+        "func_name",
+        "description",
+        "args",
+        )
     global_lookup = {}
 
     def __init__(self, rna_op):




More information about the Bf-blender-cvs mailing list