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>2016-01-06 16:18:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-06 16:24:33 +0300
commit60c0c47dba97ef2bdbc4bdb6e936da0297a0c1f9 (patch)
tree4a937ef2c88b46a3c67ae404acce16f4c899dbc5 /release/scripts/startup/bl_operators
parentcbc0a73ae423bf467824b5d4e1e0974ad2a0fddd (diff)
Save sys-info to file instead of a text block
The main reason for this change is this file is typically used when making bug reports, its best if users attach this file to reports directly.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r--release/scripts/startup/bl_operators/wm.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 1ebe7267d38..b9dc691f41f 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1388,16 +1388,32 @@ class WM_OT_appconfig_activate(Operator):
class WM_OT_sysinfo(Operator):
- """Generate system info text, accessible from Blender's internal text editor"""
+ """Generate system information, saved into a text file"""
bl_idname = "wm.sysinfo"
- bl_label = "System Info"
+ bl_label = "Save System Info"
+
+ filepath = StringProperty(
+ subtype='FILE_PATH',
+ options={'SKIP_SAVE'},
+ )
def execute(self, context):
import sys_info
- sys_info.write_sysinfo(self)
+ sys_info.write_sysinfo(self.filepath)
return {'FINISHED'}
+ def invoke(self, context, event):
+ import os
+
+ if not self.filepath:
+ self.filepath = os.path.join(
+ os.path.expanduser("~"), "system-info.txt")
+
+ wm = context.window_manager
+ wm.fileselect_add(self)
+ return {'RUNNING_MODAL'}
+
class WM_OT_copy_prev_settings(Operator):
"""Copy settings from previous version"""