Make RNA an Operator dir() work in py 2.5 - 3.0

removed epy docstrings from RNA python api, since Python can get this info from rna. (could be redone in python if getting doc's on RNA is needed)
epy_doc_gen works again
This commit is contained in:
2009-03-05 12:09:30 +00:00
parent 0229621b51
commit a7c4009267
3 changed files with 65 additions and 211 deletions

View File

@@ -121,7 +121,14 @@ def rna2epy(target_path):
try: return rna_struct.base.identifier
except: return '' # invalid id
structs = [(base_id(rna_struct), rna_struct.identifier, rna_struct) for rna_struct in bpydoc.structs.values()]
#structs = [(base_id(rna_struct), rna_struct.identifier, rna_struct) for rna_struct in bpydoc.structs.values()]
structs = []
for rna_struct in bpydoc.structs.values():
structs.append( (base_id(rna_struct), rna_struct.identifier, rna_struct) )
structs.sort() # not needed but speeds up sort below, setting items without an inheritance first
# Arrange so classes are always defined in the correct order
@@ -173,12 +180,13 @@ def op2epy(target_path):
operators = dir(bpyoperator)
operators.remove('add')
operators.remove('remove')
operators.remove('__dir__')
operators.sort()
for op in operators:
if op.startswith('__'):
continue
# Keyword attributes
kw_args = [] # "foo = 1", "bar=0.5", "spam='ENUM'"