[Bf-blender-cvs] [ad707115d5b] master: Preferences: add new Viewport, Animation, Navigation, Save & Load sections.

Brecht Van Lommel noreply at git.blender.org
Thu Jan 17 11:45:21 CET 2019


Commit: ad707115d5bcb61a2773a5b4c697d6f66c469105
Author: Brecht Van Lommel
Date:   Wed Jan 16 18:49:31 2019 +0100
Branches: master
https://developer.blender.org/rBad707115d5bcb61a2773a5b4c697d6f66c469105

Preferences: add new Viewport, Animation, Navigation, Save & Load sections.

This further changes the preferences organization, to avoid grouping unrelated
settings together. With more sections we can also expand more panels by default,
making it possible to quickly go through sections and see the settings of each.

Panels with less used settings are still collapsed by default, to keep all panel
headers visible without scrolling.

Differential Revision: https://developer.blender.org/D4216

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/blenloader/intern/versioning_defaults.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index fbead50f108..b5a139e509b 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -36,7 +36,7 @@ class USERPREF_HT_header(Header):
         layout.template_header()
 
 
-class USERPREF_PT_navigation(Panel):
+class USERPREF_PT_navigation_bar(Panel):
     bl_label = "Preferences Navigation"
     bl_space_type = 'PREFERENCES'
     bl_region_type = 'NAVIGATION_BAR'
@@ -118,26 +118,19 @@ class USERPREF_PT_interface_display(PreferencePanel):
         flow.prop(view, "ui_scale", text="Resolution Scale")
         flow.prop(view, "ui_line_width", text="Line Width")
 
-
-class USERPREF_PT_interface_display_info(PreferencePanel):
-    bl_label = "Information"
-    bl_parent_id = "USERPREF_PT_interface_display"
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        view = prefs.view
+        layout.separator()
 
         flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
 
+        flow.prop(view, "show_splash", text="Splash Screen")
         flow.prop(view, "show_tooltips")
-        flow.prop(view, "show_object_info", text="Object Info")
+        flow.prop(view, "show_tooltips_python")
+        flow.prop(view, "show_developer_ui")
         flow.prop(view, "show_large_cursors")
-        flow.prop(view, "show_view_name", text="View Name")
-        flow.prop(view, "show_playback_fps", text="Playback FPS")
 
 
 class USERPREF_PT_interface_text(PreferencePanel):
-    bl_label = "Text"
+    bl_label = "Text Rendering"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -160,15 +153,13 @@ class USERPREF_PT_interface_text(PreferencePanel):
         flow.prop(view, "font_path_ui_mono")
 
 
-class USERPREF_PT_interface_text_translate(PreferencePanel):
-    bl_label = "Translate UI"
-    bl_parent_id = "USERPREF_PT_interface_text"
+class USERPREF_PT_interface_translation(PreferencePanel):
+    bl_label = "Translation"
 
     @classmethod
     def poll(cls, context):
         prefs = context.preferences
-        if bpy.app.build_options.international:
-            return (prefs.active_section == 'INTERFACE')
+        return (prefs.active_section == 'INTERFACE') and bpy.app.build_options.international
 
     def draw_header(self, context):
         prefs = context.preferences
@@ -182,115 +173,34 @@ class USERPREF_PT_interface_text_translate(PreferencePanel):
 
         layout.active = view.use_international_fonts
 
-        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):
-    bl_label = "Develop"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        prefs = context.preferences
-        return (prefs.active_section == 'INTERFACE')
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        view = prefs.view
+        layout.prop(view, "language")
 
         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")
+        flow.prop(view, "use_translate_tooltips", text="Tooltips")
+        flow.prop(view, "use_translate_interface", text="Interface")
+        flow.prop(view, "use_translate_new_dataname", text="New Data")
 
 
-class USERPREF_PT_interface_viewports(PreferencePanel):
-    bl_label = "Viewports"
-    bl_options = {'DEFAULT_CLOSED'}
+class USERPREF_PT_interface_editors(PreferencePanel):
+    bl_label = "Editors"
 
     @classmethod
     def poll(cls, context):
         prefs = context.preferences
         return (prefs.active_section == 'INTERFACE')
 
-    def draw(self, context):
-        pass
-
-
-class USERPREF_PT_interface_viewports_3d(PreferencePanel):
-    bl_label = "3D Viewports"
-    bl_parent_id = "USERPREF_PT_interface_viewports"
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        view = prefs.view
-
-        flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
-
-        col = flow.column()
-
-        col.prop(view, "smooth_view")
-        col.prop(view, "rotation_angle")
-        col.separator()
-
-        col = flow.column()
-
-        col.prop(view, "object_origin_size")
-        col.prop(view, "gizmo_size", text="Gizmo Size")
-        col.separator()
-
-        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")
-
-
-class USERPREF_PT_interface_viewports_3d_weight_paint(PreferencePanel):
-    bl_label = "Custom Weight Paint Range"
-    bl_options = {'DEFAULT_CLOSED'}
-    bl_parent_id = "USERPREF_PT_interface_viewports_3d"
-
-    def draw_header(self, context):
-        prefs = context.preferences
-        view = prefs.view
-
-        self.layout.prop(view, "use_weight_color_range", text="")
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        view = prefs.view
-
-        layout.active = view.use_weight_color_range
-        layout.template_color_ramp(view, "weight_color_range", expand=True)
-
-
-class USERPREF_PT_interface_viewports_2d(PreferencePanel):
-    bl_label = "2D Viewports"
-    bl_parent_id = "USERPREF_PT_interface_viewports"
-
     def draw_props(self, context, layout):
         prefs = context.preferences
         view = prefs.view
+        system = prefs.system
 
         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':
-            flow.prop(view, "view_frame_seconds")
-        elif view.view_frame_type == 'KEYFRAMES':
-            flow.prop(view, "view_frame_keyframes")
+        flow.row().prop(view, "header_align_default", expand=True)
+        flow.prop(system, "use_region_overlap")
+        flow.prop(view, "show_layout_ui", text="Corner Splitting")
+        flow.prop(view, "color_picker_type")
 
 
 class USERPREF_PT_interface_menus(PreferencePanel):
@@ -309,16 +219,13 @@ class USERPREF_PT_interface_menus(PreferencePanel):
 
         flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
 
-        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):
     bl_label = "Open on Mouse Over"
     bl_parent_id = "USERPREF_PT_interface_menus"
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
         prefs = context.preferences
@@ -357,24 +264,6 @@ class USERPREF_PT_interface_menus_pie(PreferencePanel):
         flow.prop(view, "pie_menu_confirm")
 
 
-class USERPREF_PT_interface_templates(PreferencePanel):
-    bl_label = "Application Templates"
-    bl_options = {'DEFAULT_CLOSED'}
-    bl_parent_id = "USERPREF_PT_interface_develop"
-
-    @classmethod
-    def poll(cls, context):
-        prefs = context.preferences
-        return (prefs.active_section == 'INTERFACE')
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        view = prefs.view
-
-        layout.label(text="Options intended for developing application templates only")
-        layout.prop(view, "show_layout_ui")
-
-
 class USERPREF_PT_edit_objects(PreferencePanel):
     bl_label = "Objects"
 
@@ -394,9 +283,8 @@ class USERPREF_PT_edit_objects(PreferencePanel):
         flow.prop(edit, "use_enter_edit_mode", text="Enter Edit Mode for New Objects")
 
 
-class USERPREF_PT_edit_animation(PreferencePanel):
-    bl_label = "Animation"
-    bl_options = {'DEFAULT_CLOSED'}
+class USERPREF_PT_edit_cursor(PreferencePanel):
+    bl_label = "3D Cursor"
 
     @classmethod
     def poll(cls, context):
@@ -409,45 +297,8 @@ class USERPREF_PT_edit_animation(PreferencePanel):
 
         flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
 
-        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):
-    bl_label = "Auto-Keyframing"
-    bl_parent_id = "USERPREF_PT_edit_animation"
-
-    def draw_header(self, context):
-        prefs = context.preferences
-        edit = prefs.edit
-
-        self.layout.prop(edit, "use_auto_keying", text="")
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        edit = prefs.edit
-
-        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):
-    bl_label = "F-Curves"
-    bl_parent_id = "USERPREF_PT_edit_animation"
-
-    def draw_props(self, context, layout):
-        prefs = context.preferences
-        edit = prefs.edit
-
-        flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
-
-        flow.prop(edit, "fcurve_unselected_alpha", text="F-Cu

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list