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>2011-02-04 12:35:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-04 12:35:20 +0300
commitfeed9c3d1fd006952b3596d550dc56854ed7f52d (patch)
tree8921e25778947789989a3a5a28d7e77fe80cbc3e /source/blender/python/rna_dump.py
parent736a7b7a2280a843686b7699fc9d96915801a459 (diff)
mathutils.Matrix.OrthoProjection(plane, size, axis), merged axis and plane args. since axis was only allowed when plane was 'R'.
This was already done with Matrix.Rotation().
Diffstat (limited to 'source/blender/python/rna_dump.py')
-rw-r--r--source/blender/python/rna_dump.py59
1 files changed, 35 insertions, 24 deletions
diff --git a/source/blender/python/rna_dump.py b/source/blender/python/rna_dump.py
index 89240715584..df902886f30 100644
--- a/source/blender/python/rna_dump.py
+++ b/source/blender/python/rna_dump.py
@@ -18,6 +18,8 @@
#
# #**** END GPL LICENSE BLOCK #****
+# <pep8 compliant>
+
if 1:
# Print once every 1000
GEN_PATH = True
@@ -37,6 +39,7 @@ else:
seek_count = [0]
+
def seek(r, txt, recurs):
seek_count[0] += 1
@@ -71,52 +74,60 @@ def seek(r, txt, recurs):
print(txt + ' -> "' + str(r) + '"')
return
- try: keys = r.keys()
- except: keys = None
+ try:
+ keys = r.keys()
+ except:
+ keys = None
if keys != None:
if PRINT_DATA:
print(txt + '.keys() - ' + str(r.keys()))
- try: __members__ = dir(r)
- except: __members__ = []
+ try:
+ __members__ = dir(r)
+ except:
+ __members__ = []
for item in __members__:
- if item.startswith('__'):
+ if item.startswith("__"):
continue
- if GEN_PATH: newtxt = txt + '.' + item
+ if GEN_PATH:
+ newtxt = txt + '.' + item
- if item == 'rna_type' and VERBOSE_TYPE==False: # just avoid because it spits out loads of data
+ if item == 'rna_type' and VERBOSE_TYPE == False: # just avoid because it spits out loads of data
continue
- try: value = getattr(r, item)
- except: value = None
-
- seek( value, newtxt, recurs + 1)
+ value = getattr(r, item, None)
+ seek(value, newtxt, recurs + 1)
if keys:
for k in keys:
- if GEN_PATH: newtxt = txt + '["' + k + '"]'
- seek(r.__getitem__(k), newtxt, recurs+1)
+ if GEN_PATH:
+ newtxt = txt + '["' + k + '"]'
+ seek(r.__getitem__(k), newtxt, recurs + 1)
else:
- try: length = len( r )
- except: length = 0
-
- if VERBOSE==False and length >= 4:
- for i in (0, length-1):
- if i>0:
+ try:
+ length = len(r)
+ except:
+ length = 0
+
+ if VERBOSE == False and length >= 4:
+ for i in (0, length - 1):
+ if i > 0:
if PRINT_DATA:
- print((' '*len(txt)) + ' ... skipping '+str(length-2)+' items ...')
+ print((" " * len(txt)) + " ... skipping " + str(length - 2) + " items ...")
- if GEN_PATH: newtxt = txt + '[' + str(i) + ']'
- seek(r[i], newtxt, recurs+1)
+ if GEN_PATH:
+ newtxt = txt + '[' + str(i) + ']'
+ seek(r[i], newtxt, recurs + 1)
else:
for i in range(length):
- if GEN_PATH: newtxt = txt + '[' + str(i) + ']'
- seek(r[i], newtxt, recurs+1)
+ if GEN_PATH:
+ newtxt = txt + '[' + str(i) + ']'
+ seek(r[i], newtxt, recurs + 1)
seek(bpy.data, 'bpy.data', 0)
# seek(bpy.types, 'bpy.types', 0)