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:
authorWilliam Reynish <billrey@me.com>2019-01-06 23:51:07 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-01-06 23:53:58 +0300
commitaa6946f6c9a1e24ea429ad989039e574ac9f14cc (patch)
tree19d69397670be8ed4602648c007dae2c04db73a7 /release
parent2edd32c168d32895a2dee3a4e13aa7979049fd1b (diff)
UI: Use grid-flow layout throughout Preferences
Makes the entire Preferences UI nicely width responsive. Also, move use_tabs_as_spaces option back to file path options, it was too lonely in its own panel ;)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py371
1 files changed, 214 insertions, 157 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index c1d8f02afe8..489ec261ded 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -116,8 +116,10 @@ class USERPREF_PT_interface_display(PreferencePanel):
prefs = context.preferences
view = prefs.view
- layout.prop(view, "ui_scale", text="Resolution Scale")
- layout.prop(view, "ui_line_width", text="Line Width")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "ui_scale", text="Resolution Scale")
+ flow.prop(view, "ui_line_width", text="Line Width")
class USERPREF_PT_interface_display_info(PreferencePanel):
@@ -128,7 +130,7 @@ class USERPREF_PT_interface_display_info(PreferencePanel):
prefs = context.preferences
view = prefs.view
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(view, "show_tooltips")
flow.prop(view, "show_object_info", text="Object Info")
@@ -150,13 +152,15 @@ class USERPREF_PT_interface_text(PreferencePanel):
prefs = context.preferences
view = prefs.view
- layout.prop(view, "use_text_antialiasing", text="Anti-aliasing")
- sub = layout.column()
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "use_text_antialiasing", text="Anti-aliasing")
+ sub = flow.column()
sub.active = view.use_text_antialiasing
sub.prop(view, "text_hinting", text="Hinting")
- layout.prop(view, "font_path_ui")
- layout.prop(view, "font_path_ui_mono")
+ flow.prop(view, "font_path_ui")
+ flow.prop(view, "font_path_ui_mono")
class USERPREF_PT_interface_text_translate(PreferencePanel):
@@ -180,11 +184,14 @@ class USERPREF_PT_interface_text_translate(PreferencePanel):
view = prefs.view
layout.active = view.use_international_fonts
- layout.prop(view, "language")
- layout.prop(view, "use_translate_tooltips", text="Translate Tooltips")
- layout.prop(view, "use_translate_interface", text="Translate Interface")
- layout.prop(view, "use_translate_new_dataname", text="Translate New Data")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "language")
+
+ flow.prop(view, "use_translate_tooltips", text="Translate Tooltips")
+ flow.prop(view, "use_translate_interface", text="Translate Interface")
+ flow.prop(view, "use_translate_new_dataname", text="Translate New Data")
class USERPREF_PT_interface_develop(PreferencePanel):
@@ -200,8 +207,10 @@ class USERPREF_PT_interface_develop(PreferencePanel):
prefs = context.preferences
view = prefs.view
- layout.prop(view, "show_tooltips_python")
- layout.prop(view, "show_developer_ui")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "show_tooltips_python")
+ flow.prop(view, "show_developer_ui")
class USERPREF_PT_interface_viewports(PreferencePanel):
@@ -225,18 +234,25 @@ class USERPREF_PT_interface_viewports_3d(PreferencePanel):
prefs = context.preferences
view = prefs.view
- layout.prop(view, "smooth_view")
- layout.prop(view, "rotation_angle")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- layout.separator()
+ col = flow.column()
- layout.prop(view, "object_origin_size")
- layout.prop(view, "gizmo_size", text="Gizmo Size")
- layout.separator()
+ col.prop(view, "smooth_view")
+ col.prop(view, "rotation_angle")
+ col.separator()
+
+ col = flow.column()
- layout.prop(view, "mini_axis_type", text="3D Viewport Axis")
+ col.prop(view, "object_origin_size")
+ col.prop(view, "gizmo_size", text="Gizmo Size")
+ col.separator()
- sub = layout.column()
+ col = flow.column()
+
+ col.prop(view, "mini_axis_type", text="3D Viewport Axis")
+
+ sub = col.column()
sub.active = view.mini_axis_type == 'MINIMAL'
sub.prop(view, "mini_axis_size", text="Size")
sub.prop(view, "mini_axis_brightness", text="Brightness")
@@ -269,13 +285,15 @@ class USERPREF_PT_interface_viewports_2d(PreferencePanel):
prefs = context.preferences
view = prefs.view
- layout.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
- layout.prop(view, "timecode_style")
- layout.prop(view, "view_frame_type")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
+ flow.prop(view, "timecode_style")
+ flow.prop(view, "view_frame_type")
if view.view_frame_type == 'SECONDS':
- layout.prop(view, "view_frame_seconds")
+ flow.prop(view, "view_frame_seconds")
elif view.view_frame_type == 'KEYFRAMES':
- layout.prop(view, "view_frame_keyframes")
+ flow.prop(view, "view_frame_keyframes")
class USERPREF_PT_interface_menus(PreferencePanel):
@@ -292,12 +310,13 @@ class USERPREF_PT_interface_menus(PreferencePanel):
view = prefs.view
system = prefs.system
- layout.prop(view, "color_picker_type")
- layout.row().prop(view, "header_align_default", expand=True)
- layout.prop(system, "use_region_overlap")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- layout.prop(view, "show_splash")
- layout.prop(view, "use_quit_dialog")
+ flow.prop(view, "color_picker_type")
+ flow.row().prop(view, "header_align_default", expand=True)
+ flow.prop(system, "use_region_overlap")
+ flow.prop(view, "show_splash")
+ flow.prop(view, "use_quit_dialog")
class USERPREF_PT_interface_menus_mouse_over(PreferencePanel):
@@ -316,8 +335,10 @@ class USERPREF_PT_interface_menus_mouse_over(PreferencePanel):
layout.active = view.use_mouse_over_open
- layout.prop(view, "open_toplevel_delay", text="Top Level")
- layout.prop(view, "open_sublevel_delay", text="Sub Level")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "open_toplevel_delay", text="Top Level")
+ flow.prop(view, "open_sublevel_delay", text="Sub Level")
class USERPREF_PT_interface_menus_pie(PreferencePanel):
@@ -328,11 +349,13 @@ class USERPREF_PT_interface_menus_pie(PreferencePanel):
prefs = context.preferences
view = prefs.view
- layout.prop(view, "pie_animation_timeout")
- layout.prop(view, "pie_initial_timeout")
- layout.prop(view, "pie_menu_radius")
- layout.prop(view, "pie_menu_threshold")
- layout.prop(view, "pie_menu_confirm")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(view, "pie_animation_timeout")
+ flow.prop(view, "pie_initial_timeout")
+ flow.prop(view, "pie_menu_radius")
+ flow.prop(view, "pie_menu_threshold")
+ flow.prop(view, "pie_menu_confirm")
class USERPREF_PT_interface_templates(PreferencePanel):
@@ -365,9 +388,11 @@ class USERPREF_PT_edit_objects(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "material_link", text="Link Materials to")
- layout.prop(edit, "object_align", text="Align New Objects to")
- layout.prop(edit, "use_enter_edit_mode", text="Enter Edit Mode for New Objects")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(edit, "material_link", text="Link Materials to")
+ flow.prop(edit, "object_align", text="Align New Objects to")
+ flow.prop(edit, "use_enter_edit_mode", text="Enter Edit Mode for New Objects")
class USERPREF_PT_edit_animation(PreferencePanel):
@@ -383,10 +408,11 @@ class USERPREF_PT_edit_animation(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "use_negative_frames")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- layout.prop(edit, "use_visual_keying")
- layout.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
+ flow.prop(edit, "use_negative_frames")
+ flow.prop(edit, "use_visual_keying")
+ flow.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
class USERPREF_PT_edit_animation_autokey(PreferencePanel):
@@ -403,8 +429,10 @@ class USERPREF_PT_edit_animation_autokey(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "use_auto_keying_warning")
- layout.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(edit, "use_auto_keying_warning")
+ flow.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
class USERPREF_PT_edit_animation_fcurves(PreferencePanel):
@@ -415,13 +443,12 @@ class USERPREF_PT_edit_animation_fcurves(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "keyframe_new_interpolation_type", text="Default Interpolation")
- layout.prop(edit, "keyframe_new_handle_type", text="Default Handles")
- layout.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- layout.separator()
-
- layout.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility")
+ flow.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility")
+ flow.prop(edit, "keyframe_new_interpolation_type", text="Default Interpolation")
+ flow.prop(edit, "keyframe_new_handle_type", text="Default Handles")
+ flow.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
class USERPREF_PT_edit_duplicate_data(PreferencePanel):
@@ -438,7 +465,7 @@ class USERPREF_PT_edit_duplicate_data(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
col = flow.column()
col.prop(edit, "use_duplicate_action", text="Action")
@@ -470,8 +497,10 @@ class USERPREF_PT_edit_gpencil(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
- layout.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
+ flow.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
class USERPREF_PT_edit_annotations(PreferencePanel):
@@ -487,9 +516,11 @@ class USERPREF_PT_edit_annotations(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "grease_pencil_default_color", text="Default Color")
- layout.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
- layout.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(edit, "grease_pencil_default_color", text="Default Color")
+ flow.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
+ flow.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
class USERPREF_PT_edit_misc(PreferencePanel):
@@ -505,8 +536,10 @@ class USERPREF_PT_edit_misc(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
- layout.prop(edit, "node_margin", text="Node Auto-offset Margin")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
+ flow.prop(edit, "node_margin", text="Node Auto-offset Margin")
class USERPREF_PT_edit_cursor(PreferencePanel):
@@ -522,8 +555,10 @@ class USERPREF_PT_edit_cursor(PreferencePanel):
prefs = context.preferences
edit = prefs.edit
- layout.prop(edit, "use_mouse_depth_cursor")
- layout.prop(edit, "use_cursor_lock_adjust")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(edit, "use_mouse_depth_cursor")
+ flow.prop(edit, "use_cursor_lock_adjust")
class USERPREF_PT_system_sound(PreferencePanel):
@@ -539,8 +574,10 @@ class USERPREF_PT_system_sound(PreferencePanel):
prefs = context.preferences
system = prefs.system
- layout.prop(system, "audio_device", expand=False)
- sub = layout.column()
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(system, "audio_device", expand=False)
+ sub = flow.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False)
sub.active = system.audio_device not in {'NONE', 'Null'}
sub.prop(system, "audio_channels", text="Channels")
sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
@@ -588,14 +625,15 @@ class USERPREF_PT_system_opengl(PreferencePanel):
prefs = context.preferences
system = prefs.system
- layout.prop(system, "gpu_viewport_quality")
- layout.prop(system, "gl_clip_alpha", slider=True)
- layout.prop(system, "multi_sample", text="Multisampling")
- layout.prop(system, "gpencil_multi_sample", text="Grease Pencil Multisampling")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(system, "gpu_viewport_quality")
+ flow.prop(system, "gl_clip_alpha", slider=True)
+ flow.prop(system, "multi_sample", text="Multisampling")
+ flow.prop(system, "gpencil_multi_sample", text="Grease Pencil Multisampling")
if sys.platform == "linux" and system.multi_sample != 'NONE':
layout.label(text="Might fail for Mesh editing selection!")
- layout.separator()
class USERPREF_PT_system_opengl_textures(PreferencePanel):
@@ -611,14 +649,16 @@ class USERPREF_PT_system_opengl_textures(PreferencePanel):
prefs = context.preferences
system = prefs.system
- layout.prop(system, "gl_texture_limit", text="Limit Size")
- layout.prop(system, "anisotropic_filter")
- layout.prop(system, "texture_time_out", text="Time Out")
- layout.prop(system, "texture_collection_rate", text="Garbage Collection Rate")
- layout.prop(system, "image_draw_method", text="Image Display Method")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- layout.prop(system, "use_16bit_textures")
- layout.prop(system, "use_gpu_mipmap")
+ flow.prop(system, "gl_texture_limit", text="Limit Size")
+ flow.prop(system, "anisotropic_filter")
+ flow.prop(system, "texture_time_out", text="Time Out")
+ flow.prop(system, "texture_collection_rate", text="Garbage Collection Rate")
+ flow.prop(system, "image_draw_method", text="Image Display Method")
+
+ flow.prop(system, "use_16bit_textures")
+ flow.prop(system, "use_gpu_mipmap")
class USERPREF_PT_system_opengl_selection(PreferencePanel):
@@ -629,8 +669,10 @@ class USERPREF_PT_system_opengl_selection(PreferencePanel):
prefs = context.preferences
system = prefs.system
- layout.prop(system, "select_method", text="Selection Method")
- layout.prop(system, "use_select_pick_depth")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(system, "select_method", text="Selection Method")
+ flow.prop(system, "use_select_pick_depth")
class USERPREF_PT_system_memory(PreferencePanel):
@@ -647,17 +689,18 @@ class USERPREF_PT_system_memory(PreferencePanel):
system = prefs.system
edit = prefs.edit
- layout.prop(edit, "undo_steps", text="Undo Steps")
- layout.prop(edit, "undo_memory_limit", text="Undo Memory Limit")
- layout.prop(edit, "use_global_undo")
-
- layout.separator()
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- layout.prop(system, "memory_cache_limit", text="Sequencer Cache Limit")
+ flow.prop(edit, "undo_steps", text="Undo Steps")
+ flow.prop(edit, "undo_memory_limit", text="Undo Memory Limit")
+ flow.prop(edit, "use_global_undo")
layout.separator()
- layout.prop(system, "scrollback", text="Console Scrollback Lines")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(system, "memory_cache_limit", text="Sequencer Cache Limit")
+ flow.prop(system, "scrollback", text="Console Scrollback Lines")
class USERPREF_MT_interface_theme_presets(Menu):
@@ -737,7 +780,7 @@ class PreferenceThemeWidgetColorPanel(Panel):
layout.use_property_split = True
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
col = flow.column()
col.prop(widget_style, "outline")
@@ -774,7 +817,7 @@ class USERPREF_PT_theme_interface_state(PreferencePanel):
ui = theme.user_interface
ui_state = theme.user_interface.wcol_state
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
col = flow.column(align=True)
col.prop(ui_state, "inner_anim")
@@ -809,7 +852,7 @@ class USERPREF_PT_theme_interface_styles(PreferencePanel):
theme = context.preferences.themes[0]
ui = theme.user_interface
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(ui, "menu_shadow_fac")
flow.prop(ui, "icon_alpha")
@@ -828,7 +871,7 @@ class USERPREF_PT_theme_interface_gizmos(PreferencePanel):
theme = context.preferences.themes[0]
ui = theme.user_interface
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=True, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=True, align=False)
col = flow.column(align=True)
col.prop(ui, "axis_x", text="Axis X")
@@ -853,7 +896,7 @@ class USERPREF_PT_theme_interface_icons(PreferencePanel):
theme = context.preferences.themes[0]
ui = theme.user_interface
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(ui, "icon_collection")
flow.prop(ui, "icon_object")
@@ -874,7 +917,7 @@ class USERPREF_PT_theme_text_style(PreferencePanel):
@staticmethod
def _ui_font_style(layout, font_style):
layout.use_property_split = True
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
col = flow.column()
col.row().prop(font_style, "font_kerning_style", expand=True)
@@ -933,7 +976,7 @@ class USERPREF_PT_theme_bone_color_sets(PreferencePanel):
for i, ui in enumerate(theme.bone_color_sets, 1):
layout.label(text=iface_(f"Color Set {i:d}"), translate=False)
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(ui, "normal")
flow.prop(ui, "select")
@@ -977,7 +1020,7 @@ class PreferenceThemeSpacePanel(Panel):
layout.use_property_split = True
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
props_type = {}
@@ -1138,19 +1181,21 @@ class USERPREF_PT_file_paths(Panel):
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
- layout.prop(paths, "render_output_directory", text="Render Output")
- layout.prop(paths, "render_cache_directory", text="Render Cache")
- layout.prop(paths, "font_directory", text="Fonts")
- layout.prop(paths, "texture_directory", text="Textures")
- layout.prop(paths, "script_directory", text="Scripts")
- layout.prop(paths, "sound_directory", text="Sounds")
- layout.prop(paths, "temporary_directory", text="Temp")
- layout.prop(paths, "i18n_branches_directory", text="I18n Branches")
- layout.prop(paths, "image_editor", text="Image Editor")
- layout.prop(paths, "animation_player_preset", text="Playback Preset")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(paths, "render_output_directory", text="Render Output")
+ flow.prop(paths, "render_cache_directory", text="Render Cache")
+ flow.prop(paths, "font_directory", text="Fonts")
+ flow.prop(paths, "texture_directory", text="Textures")
+ flow.prop(paths, "script_directory", text="Scripts")
+ flow.prop(paths, "sound_directory", text="Sounds")
+ flow.prop(paths, "temporary_directory", text="Temp")
+ flow.prop(paths, "i18n_branches_directory", text="I18n Branches")
+ flow.prop(paths, "image_editor", text="Image Editor")
+ flow.prop(paths, "animation_player_preset", text="Playback Preset")
if paths.animation_player_preset == 'CUSTOM':
- layout.prop(paths, "animation_player", text="Animation Player")
+ flow.prop(paths, "animation_player", text="Animation Player")
class USERPREF_PT_file_autorun(Panel):
@@ -1205,7 +1250,7 @@ class USERPREF_PT_file_saveload(PreferencePanel):
paths = prefs.filepaths
system = prefs.system
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(paths, "use_relative_paths")
flow.prop(paths, "use_file_compression")
@@ -1216,12 +1261,15 @@ class USERPREF_PT_file_saveload(PreferencePanel):
flow.prop(paths, "hide_system_bookmarks")
flow.prop(paths, "show_thumbnails")
flow.prop(paths, "use_save_preview_images")
+ flow.prop(paths, "use_tabs_as_spaces")
layout.separator()
- layout.prop(paths, "save_version")
- layout.prop(paths, "recent_files")
- layout.prop(paths, "author", text="Author")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(paths, "save_version")
+ flow.prop(paths, "recent_files")
+ flow.prop(paths, "author", text="Author")
class USERPREF_PT_file_saveload_autosave(PreferencePanel):
@@ -1233,24 +1281,15 @@ class USERPREF_PT_file_saveload_autosave(PreferencePanel):
paths = prefs.filepaths
system = prefs.system
- layout.prop(paths, "use_keep_session")
- layout.prop(paths, "use_auto_save_temporary_files")
- sub = layout.column()
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(paths, "use_keep_session")
+ flow.prop(paths, "use_auto_save_temporary_files")
+ sub = flow.column()
sub.active = paths.use_auto_save_temporary_files
sub.prop(paths, "auto_save_time", text="Timer (mins)")
-class USERPREF_PT_file_saveload_texteditor(PreferencePanel):
- bl_label = "Text Editor"
- bl_parent_id = "USERPREF_PT_file_saveload"
-
- def draw_props(self, context, layout):
- prefs = context.preferences
- paths = prefs.filepaths
-
- layout.prop(paths, "use_tabs_as_spaces")
-
-
class USERPREF_MT_ndof_settings(Menu):
# accessed from the window key-bindings in C (only)
bl_label = "3D Mouse Settings"
@@ -1318,8 +1357,10 @@ class USERPREF_PT_input_devices_keyboard(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.prop(inputs, "use_emulate_numpad")
- layout.prop(inputs, "use_numeric_input_advanced")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(inputs, "use_emulate_numpad")
+ flow.prop(inputs, "use_numeric_input_advanced")
class USERPREF_PT_input_devices_mouse(PreferencePanel):
@@ -1330,12 +1371,14 @@ class USERPREF_PT_input_devices_mouse(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.prop(inputs, "drag_threshold")
- layout.prop(inputs, "tweak_threshold")
- layout.prop(inputs, "mouse_double_click_time", text="Double Click Speed")
- layout.prop(inputs, "use_mouse_emulate_3_button")
- layout.prop(inputs, "use_mouse_continuous")
- layout.prop(inputs, "use_drag_immediately")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(inputs, "drag_threshold")
+ flow.prop(inputs, "tweak_threshold")
+ flow.prop(inputs, "mouse_double_click_time", text="Double Click Speed")
+ flow.prop(inputs, "use_mouse_emulate_3_button")
+ flow.prop(inputs, "use_mouse_continuous")
+ flow.prop(inputs, "use_drag_immediately")
class USERPREF_PT_input_view(PreferencePanel):
@@ -1360,13 +1403,15 @@ class USERPREF_PT_input_view_orbit(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.row().prop(inputs, "view_rotate_method", expand=True)
- layout.prop(inputs, "use_rotate_around_active")
- layout.prop(inputs, "use_auto_perspective")
- layout.prop(inputs, "use_mouse_depth_navigate")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.row().prop(inputs, "view_rotate_method", expand=True)
+ flow.prop(inputs, "use_rotate_around_active")
+ flow.prop(inputs, "use_auto_perspective")
+ flow.prop(inputs, "use_mouse_depth_navigate")
if sys.platform == "darwin":
- layout.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction")
+ flow.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction")
class USERPREF_PT_input_view_zoom(PreferencePanel):
@@ -1377,14 +1422,16 @@ class USERPREF_PT_input_view_zoom(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.row().prop(inputs, "view_zoom_method", text="Zoom Method", expand=True)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.row().prop(inputs, "view_zoom_method", text="Zoom Method", expand=True)
if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}:
- layout.row().prop(inputs, "view_zoom_axis", expand=True)
- layout.prop(inputs, "invert_mouse_zoom", text="Invert Mouse Zoom Direction")
+ flow.row().prop(inputs, "view_zoom_axis", expand=True)
+ flow.prop(inputs, "invert_mouse_zoom", text="Invert Mouse Zoom Direction")
- layout.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
+ flow.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
# sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
- layout.prop(inputs, "use_zoom_to_mouse")
+ flow.prop(inputs, "use_zoom_to_mouse")
class USERPREF_PT_input_view_fly_walk(PreferencePanel):
@@ -1395,8 +1442,10 @@ class USERPREF_PT_input_view_fly_walk(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.row().prop(inputs, "navigation_mode", expand=True)
- layout.prop(inputs, "use_camera_lock_parent")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.row().prop(inputs, "navigation_mode", expand=True)
+ flow.prop(inputs, "use_camera_lock_parent")
class USERPREF_PT_input_view_fly_walk_navigation(PreferencePanel):
@@ -1414,11 +1463,13 @@ class USERPREF_PT_input_view_fly_walk_navigation(PreferencePanel):
inputs = prefs.inputs
walk = inputs.walk_navigation
- layout.prop(walk, "use_mouse_reverse")
- layout.prop(walk, "mouse_speed")
- layout.prop(walk, "teleport_time")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(walk, "use_mouse_reverse")
+ flow.prop(walk, "mouse_speed")
+ flow.prop(walk, "teleport_time")
- sub = layout.column(align=True)
+ sub = flow.column(align=True)
sub.prop(walk, "walk_speed")
sub.prop(walk, "walk_speed_factor")
@@ -1446,8 +1497,11 @@ class USERPREF_PT_input_view_fly_walk_gravity(PreferencePanel):
walk = inputs.walk_navigation
layout.active = walk.use_gravity
- layout.prop(walk, "view_height")
- layout.prop(walk, "jump_height")
+
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(walk, "view_height")
+ flow.prop(walk, "jump_height")
class USERPREF_PT_input_devices_tablet(PreferencePanel):
@@ -1458,8 +1512,10 @@ class USERPREF_PT_input_devices_tablet(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.prop(inputs, "pressure_threshold_max")
- layout.prop(inputs, "pressure_softness")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(inputs, "pressure_threshold_max")
+ flow.prop(inputs, "pressure_softness")
class USERPREF_PT_input_devices_ndof(PreferencePanel):
@@ -1478,14 +1534,16 @@ class USERPREF_PT_input_devices_ndof(PreferencePanel):
prefs = context.preferences
inputs = prefs.inputs
- layout.prop(inputs, "ndof_sensitivity", text="Pan Sensitivity")
- layout.prop(inputs, "ndof_orbit_sensitivity", text="Orbit Sensitivity")
- layout.prop(inputs, "ndof_deadzone", text="Deadzone")
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+
+ flow.prop(inputs, "ndof_sensitivity", text="Pan Sensitivity")
+ flow.prop(inputs, "ndof_orbit_sensitivity", text="Orbit Sensitivity")
+ flow.prop(inputs, "ndof_deadzone", text="Deadzone")
layout.separator()
- layout.row().prop(inputs, "ndof_view_navigate_method", expand=True)
- layout.row().prop(inputs, "ndof_view_rotate_method", expand=True)
+ flow.row().prop(inputs, "ndof_view_navigate_method", expand=True)
+ flow.row().prop(inputs, "ndof_view_rotate_method", expand=True)
class USERPREF_MT_keyconfigs(Menu):
@@ -1878,7 +1936,7 @@ class StudioLightPanelMixin():
def draw_light_list(self, layout, lights):
if lights:
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False)
for studio_light in lights:
self.draw_studio_light(flow, studio_light)
else:
@@ -2023,7 +2081,6 @@ classes += (
USERPREF_PT_file_autorun,
USERPREF_PT_file_saveload,
USERPREF_PT_file_saveload_autosave,
- USERPREF_PT_file_saveload_texteditor,
USERPREF_MT_ndof_settings,
USERPREF_MT_keyconfigs,