diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-06-14 20:15:37 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-06-14 20:22:03 +0300 |
commit | bcff0ef9cabc37c4b89a1e2c7972a09ac80d4555 (patch) | |
tree | 06c0f6e881018b578197ddbcfe671c70318cf852 /release/scripts | |
parent | 2e5671a959182dadcdd55117732082ab7893f3d1 (diff) |
UI: Windows Blend File Association
This patch allows Windows users to specify that their current blender
installation should be used to create thumbnails and be associated
with ".blend" files. This is done from Preferences / System. The only
way to do this currently is from the command-line and this is sometimes
inconvenient.
Differential Revision: https://developer.blender.org/D10887
Reviewed by Brecht Van Lommel
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 26ad22d3ac2..b3a456ee2fe 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -605,6 +605,25 @@ class USERPREF_PT_system_cycles_devices(SystemPanel, CenterAlignMixIn, Panel): # col.row().prop(system, "opensubdiv_compute_type", text="") +class USERPREF_PT_system_os_settings(SystemPanel, CenterAlignMixIn, Panel): + bl_label = "Operating System Settings" + + @classmethod + def poll(cls, _context): + # Only for Windows so far + import sys + return sys.platform[:3] == "win" + + def draw_centered(self, context, layout): + prefs = context.preferences + + layout.label(text="Make this installation your default Blender") + split = layout.split(factor=0.4) + split.alignment = 'RIGHT' + split.label(text="") + split.operator("file.associate_blend", text="Make Default") + + class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): bl_label = "Memory & Limits" @@ -2324,6 +2343,7 @@ classes = ( USERPREF_PT_animation_fcurves, USERPREF_PT_system_cycles_devices, + USERPREF_PT_system_os_settings, USERPREF_PT_system_memory, USERPREF_PT_system_video_sequencer, USERPREF_PT_system_sound, |