From 0ecae611f993843140a347cd8c366cfe8fefe711 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 19 Jun 2010 12:06:34 +0000 Subject: [PATCH] rna info module now prints out property names into the console when run directly --- release/scripts/modules/rna_info.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 0f6d60066a3..9e106597a01 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -633,6 +633,8 @@ if __name__ == "__main__": 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) + if bpy.app.background: + print(data) + else: + text = bpy.data.texts.new(name="api.py") + text.from_string(data)