Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_userpref.py
| Show First 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | def draw_centered(self, context, layout): | ||||
| if bpy.app.build_options.cycles: | if bpy.app.build_options.cycles: | ||||
| addon = prefs.addons.get("cycles") | addon = prefs.addons.get("cycles") | ||||
| if addon is not None: | if addon is not None: | ||||
| addon.preferences.draw_impl(col, context) | addon.preferences.draw_impl(col, context) | ||||
| del addon | del addon | ||||
| class USERPREF_PT_system_gpu_backend(SystemPanel, CenterAlignMixIn, Panel): | |||||
| bl_label = "GPU Backend" | |||||
| @classmethod | |||||
| def poll(cls, _context): | |||||
| # Only for Apple so far | |||||
| import sys | |||||
| return sys.platform == "darwin" | |||||
| def draw_centered(self, context, layout): | |||||
| import gpu | |||||
| prefs = context.preferences | |||||
| system = prefs.system | |||||
| col = layout.column() | |||||
| col.prop(system, "gpu_backend") | |||||
| if system.gpu_backend != gpu.platform.backend_type_get(): | |||||
| layout.label(text="Requires a restart of Blender to take effect.", icon='INFO') | |||||
| class USERPREF_PT_system_os_settings(SystemPanel, CenterAlignMixIn, Panel): | class USERPREF_PT_system_os_settings(SystemPanel, CenterAlignMixIn, Panel): | ||||
| bl_label = "Operating System Settings" | bl_label = "Operating System Settings" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, _context): | def poll(cls, _context): | ||||
| # Only for Windows so far | # Only for Windows so far | ||||
| import sys | import sys | ||||
| return sys.platform[:3] == "win" | return sys.platform[:3] == "win" | ||||
| ▲ Show 20 Lines • Show All 1,786 Lines • ▼ Show 20 Lines | classes = ( | ||||
| USERPREF_PT_edit_text_editor, | USERPREF_PT_edit_text_editor, | ||||
| USERPREF_PT_edit_misc, | USERPREF_PT_edit_misc, | ||||
| USERPREF_PT_animation_timeline, | USERPREF_PT_animation_timeline, | ||||
| USERPREF_PT_animation_keyframes, | USERPREF_PT_animation_keyframes, | ||||
| USERPREF_PT_animation_fcurves, | USERPREF_PT_animation_fcurves, | ||||
| USERPREF_PT_system_cycles_devices, | USERPREF_PT_system_cycles_devices, | ||||
| USERPREF_PT_system_gpu_backend, | |||||
| USERPREF_PT_system_os_settings, | USERPREF_PT_system_os_settings, | ||||
| USERPREF_PT_system_memory, | USERPREF_PT_system_memory, | ||||
| USERPREF_PT_system_video_sequencer, | USERPREF_PT_system_video_sequencer, | ||||
| USERPREF_PT_system_sound, | USERPREF_PT_system_sound, | ||||
| USERPREF_MT_interface_theme_presets, | USERPREF_MT_interface_theme_presets, | ||||
| USERPREF_PT_theme, | USERPREF_PT_theme, | ||||
| USERPREF_PT_theme_interface_state, | USERPREF_PT_theme_interface_state, | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||