[Bf-blender-cvs] [d75c410bf57] userpref_redesign: Another round of tweaks to new Preferences

William Reynish noreply at git.blender.org
Sat Dec 29 14:18:31 CET 2018


Commit: d75c410bf575dd321521a935c4f08c769e4605f0
Author: William Reynish
Date:   Sat Dec 29 14:13:45 2018 +0100
Branches: userpref_redesign
https://developer.blender.org/rBd75c410bf575dd321521a935c4f08c769e4605f0

Another round of tweaks to new Preferences

 - Removed doubled Cycles Compute Device text
 - Moved header placement into menus panel
 - Moved Text panel & rna to Interface
 - Moved OpenGL Texture panel inside OpenGL panel
 - Moved Color Picker Type to from System>Misc to Interface>Menus (eventually it'd be nice to include this option inside the color pickers themselves to make it more useful and discoverable)
 - Combined all memory-related preferences (Undo + Console Scrollback + Sequencer Cache) in a Memory panel in System section (avoids needing previous Misc panel)
 - Added correct greying out to Files > Auto Run Python Scripts panel
 - Added flow layout to Save & Load checkboxes
 - Rejiggered some of the Texture preferences to make more logical sense together
 - A few other minor adjustments

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

M	intern/cycles/blender/addon/properties.py
M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 3f6c6de5c5e..9cbb2e86369 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -1485,7 +1485,6 @@ class CyclesPreferences(bpy.types.AddonPreferences):
 
     def draw_impl(self, layout, context):
         available_device_types = self.get_device_types(context)
-        layout.label(text="Cycles Compute Device:")
         if len(available_device_types) == 1:
             layout.label(text="No compatible GPUs found", icon='INFO')
             return
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 4d2fdd151ad..658f059fc07 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -112,13 +112,9 @@ class USERPREF_PT_interface_display(PreferencePanel):
         prefs = context.preferences
         view = prefs.view
 
-        layout.prop(view, "ui_scale", text="Scale")
+        layout.prop(view, "ui_scale", text="Resolution Scale")
         layout.prop(view, "ui_line_width", text="Line Width")
 
-        layout.separator()
-
-        layout.row().prop(view, "header_align_default", expand=True)
-
 
 class USERPREF_PT_interface_display_info(PreferencePanel):
     bl_label = "Information"
@@ -128,12 +124,14 @@ class USERPREF_PT_interface_display_info(PreferencePanel):
     def draw_props(self, context, layout):
         prefs = context.preferences
         view = prefs.view
+        
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
 
-        layout.prop(view, "show_tooltips")
-        layout.prop(view, "show_object_info", text="Object Info")
-        layout.prop(view, "show_large_cursors")
-        layout.prop(view, "show_view_name", text="View Name")
-        layout.prop(view, "show_playback_fps", text="Playback FPS")
+        flow.prop(view, "show_tooltips")
+        flow.prop(view, "show_object_info", text="Object Info")
+        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_develop(PreferencePanel):
@@ -180,7 +178,7 @@ class USERPREF_PT_interface_viewports_3d(PreferencePanel):
         layout.separator()
 
         layout.prop(view, "object_origin_size")
-
+        layout.prop(view, "gizmo_size", text="Gizmo Size")
         layout.separator()
 
         layout.prop(view, "mini_axis_type", text="3D Viewport Axis")
@@ -190,10 +188,6 @@ class USERPREF_PT_interface_viewports_3d(PreferencePanel):
         sub.prop(view, "mini_axis_size", text="Size")
         sub.prop(view, "mini_axis_brightness", text="Brightness")
 
-        layout.separator()
-
-        layout.prop(view, "gizmo_size", text="Gizmo Size")
-
 
 class USERPREF_PT_interface_viewports_3d_weight_paint(PreferencePanel):
     bl_label = "Custom Weight Paint Range"
@@ -244,6 +238,9 @@ class USERPREF_PT_interface_menus(PreferencePanel):
         prefs = context.preferences
         view = prefs.view
 
+        layout.prop(view, "color_picker_type")
+        layout.row().prop(view, "header_align_default", expand=True)
+
         layout.prop(view, "show_splash")
         layout.prop(view, "use_quit_dialog")
 
@@ -301,61 +298,59 @@ class USERPREF_PT_interface_templates(PreferencePanel):
         layout.prop(view, "show_layout_ui")
 
 
-class USERPREF_PT_edit_undo(PreferencePanel):
-    bl_label = "Undo"
-
+class USERPREF_PT_interface_text(PreferencePanel):
+    bl_label = "Text"
+    bl_options = {'DEFAULT_CLOSED'}
+    
     @classmethod
     def poll(cls, context):
         prefs = context.preferences
-        return (prefs.active_section == 'EDITING')
-
+        return (prefs.active_section == 'INTERFACE')
+    
     def draw_props(self, context, layout):
         prefs = context.preferences
-        edit = prefs.edit
-
-        layout.prop(edit, "undo_steps", text="Steps")
-        layout.prop(edit, "undo_memory_limit", text="Memory Limit")
-        layout.prop(edit, "use_global_undo")
+        view = prefs.view
+        
+        layout.prop(view, "use_text_antialiasing", text="Anti-aliasing")
+        sub = layout.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")
 
 
-class USERPREF_PT_edit_objects(PreferencePanel):
-    bl_label = "Objects"
+class USERPREF_PT_interface_text_translate(PreferencePanel):
+    bl_label = "Translate UI"
     bl_options = {'DEFAULT_CLOSED'}
-
+    bl_parent_id = "USERPREF_PT_interface_text"
+    
     @classmethod
     def poll(cls, context):
         prefs = context.preferences
-        return (prefs.active_section == 'EDITING')
-
-    def draw_props(self, context, layout):
-        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")
-
-
-class USERPREF_PT_edit_gpencil(PreferencePanel):
-    bl_label = "Grease Pencil"
-    bl_options = {'DEFAULT_CLOSED'}
+        if bpy.app.build_options.international:
+            return (prefs.active_section == 'INTERFACE')
 
-    @classmethod
-    def poll(cls, context):
+    def draw_header(self, context):
         prefs = context.preferences
-        return (prefs.active_section == 'EDITING')
+        view = prefs.view
+        
+        self.layout.prop(view, "use_international_fonts", text="")
 
     def draw_props(self, context, layout):
         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")
+        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")
 
 
-class USERPREF_PT_edit_annotations(PreferencePanel):
-    bl_label = "Annotations"
-    bl_options = {'DEFAULT_CLOSED'}
+class USERPREF_PT_edit_objects(PreferencePanel):
+    bl_label = "Objects"
 
     @classmethod
     def poll(cls, context):
@@ -366,13 +361,14 @@ 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")
+        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")
 
 
 class USERPREF_PT_edit_animation(PreferencePanel):
     bl_label = "Animation"
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -475,6 +471,41 @@ class USERPREF_PT_edit_duplicate_data(PreferencePanel):
         col.prop(edit, "use_duplicate_texture", text="Texture")
 
 
+class USERPREF_PT_edit_gpencil(PreferencePanel):
+    bl_label = "Grease Pencil"
+    bl_options = {'DEFAULT_CLOSED'}
+    
+    @classmethod
+    def poll(cls, context):
+        prefs = context.preferences
+        return (prefs.active_section == 'EDITING')
+    
+    def draw_props(self, context, layout):
+        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")
+
+
+class USERPREF_PT_edit_annotations(PreferencePanel):
+    bl_label = "Annotations"
+    bl_options = {'DEFAULT_CLOSED'}
+    
+    @classmethod
+    def poll(cls, context):
+        prefs = context.preferences
+        return (prefs.active_section == 'EDITING')
+    
+    def draw_props(self, context, layout):
+        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")
+
+
 class USERPREF_PT_edit_misc(PreferencePanel):
     bl_label = "Miscellaneous"
     bl_options = {'DEFAULT_CLOSED'}
@@ -492,7 +523,7 @@ class USERPREF_PT_edit_misc(PreferencePanel):
         layout.prop(edit, "node_margin", text="Node Editor Auto-offset Margin")
 
 
-class USERPREF_PT_interface_system_sound(PreferencePanel):
+class USERPREF_PT_system_sound(PreferencePanel):
     bl_label = "Sound"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -514,7 +545,7 @@ class USERPREF_PT_interface_system_sound(PreferencePanel):
         sub.prop(system, "audio_sample_format", text="Sample Format")
 
 
-class USERPREF_PT_interface_system_compute_device(PreferencePanel):
+class USERPREF_PT_system_compute_device(PreferencePanel):
     bl_label = "Cycles Compute Device"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -541,7 +572,7 @@ class USERPREF_PT_interface_system_compute_device(PreferencePanel):
         #     col.row().prop(system, "opensubdiv_compute_type", text="")
 
 
-class USERPREF_PT_interface_system_opengl(PreferencePanel):
+class USERPREF_PT_system_opengl(PreferencePanel):
     bl_label = "OpenGL"
 
     @classmethod
@@ -554,111 +585,59 @@ class USERPREF_PT_interface_system_opengl(PreferencePanel):
         prefs = context.preferences
         system = prefs.system
 
-        layout.prop(system, "gl_clip_alpha", slider=True)
         layout.prop(

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list