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-06-15 21:14:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-15 21:14:21 +0400
commit42ab9ed59abe435b9e64617fe3073fe3cfbeb80d (patch)
treecfb54eb172e1cdd6f0e164fef8a7ebaab6c67831 /release/scripts/modules/rna_info.py
parent982cd944a4cdf3e96f0c6ebbb97347de1b1c6279 (diff)
New Scene now has the popup from 2.4x which gives the option to copy.
Added some test code for rna_info to create a big list of property+type+descriptions, useful for api name review.
Diffstat (limited to 'release/scripts/modules/rna_info.py')
-rw-r--r--release/scripts/modules/rna_info.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index fa1d15a7845..0f6d60066a3 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -620,3 +620,19 @@ def BuildRNAInfo():
# print(rna_info)
return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup
+
+
+if __name__ == "__main__":
+ import rna_info
+ struct = rna_info.BuildRNAInfo()[0]
+ data = ""
+ for struct_id, v in sorted(struct.items()):
+ struct_id_str = "".join(sid for sid in struct_id if struct_id)
+ props = [(prop.identifier, prop) for prop in v.properties]
+
+ for prop_id, prop in sorted(props):
+ data += "%s.%s: %s %s\n" % (struct_id_str, prop.identifier, prop.type, prop.description)
+
+
+ text = bpy.data.texts.new(name="api.py")
+ text.from_string(data)