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-04-10 22:35:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-10 22:35:50 +0400
commit6e3920e8fa4e2428e7c2bbcf02d0268c5f6aab28 (patch)
treec960d47b4f55fd2f57e41ca3cd7ed4f68224bfa8 /release/scripts/modules/rna_info.py
parentc939331a6ccacc571c893646e209e99680a81aa5 (diff)
rna/py/reference doc improvements..
- vectors now respect min/max settings. - keyframing and adding drivers raises an error in an index is set on a non array, keyframing raises an error if it fails. reference docs... - added docstrings for remaining python bpy_struct functions - added fake class for docs, bpy_struct, which is the base class of everything in bpy.types - improved inherictance references for struct classes, include bpy_struct members.
Diffstat (limited to 'release/scripts/modules/rna_info.py')
-rw-r--r--release/scripts/modules/rna_info.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 75b03405f49..3887faa2ac9 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -25,6 +25,7 @@ import bpy
# use to strip python paths
script_paths = bpy.utils.script_paths()
+_FAKE_STRUCT_SUBCLASS = True
def _get_direct_attr(rna_type, attr):
props = getattr(rna_type, attr)
@@ -44,6 +45,19 @@ def get_direct_properties(rna_type):
def get_direct_functions(rna_type):
return _get_direct_attr(rna_type, "functions")
+def rna_id_ignore(rna_id):
+ if rna_id == "rna_type":
+ return True
+
+ if "_OT_" in rna_id:
+ return True
+ if "_MT_" in rna_id:
+ return True
+ if "_PT_" in rna_id:
+ return True
+ if "_HT_" in rna_id:
+ return True
+ return False
def range_str(val):
if val < -10000000:
@@ -135,17 +149,17 @@ class InfoStructRNA:
def __repr__(self):
- txt = ''
+ txt = ""
txt += self.identifier
if self.base:
- txt += '(%s)' % self.base.identifier
- txt += ': ' + self.description + '\n'
+ txt += "(%s)" % self.base.identifier
+ txt += ": " + self.description + "\n"
for prop in self.properties:
- txt += prop.__repr__() + '\n'
+ txt += prop.__repr__() + "\n"
for func in self.functions:
- txt += func.__repr__() + '\n'
+ txt += func.__repr__() + "\n"
return txt
@@ -377,7 +391,6 @@ def GetInfoFunctionRNA(bl_rna, parent_id):
def GetInfoOperatorRNA(bl_rna):
return _GetInfoRNA(bl_rna, InfoOperatorRNA)
-
def BuildRNAInfo():
# Use for faster lookups
# use rna_struct.identifier as the key for each dict
@@ -387,19 +400,6 @@ def BuildRNAInfo():
rna_references_dict = {} # store a list of rna path strings that reference this type
# rna_functions_dict = {} # store all functions directly in this type (not inherited)
- def rna_id_ignore(rna_id):
- if rna_id == "rna_type":
- return True
-
- if "_OT_" in rna_id:
- return True
- if "_MT_" in rna_id:
- return True
- if "_PT_" in rna_id:
- return True
- if "_HT_" in rna_id:
- return True
- return False
def full_rna_struct_path(rna_struct):
'''