[Bf-blender-cvs] [6f6ad48c25f] userpref_redesign: Merge branch 'master' into userpref_redesign
Julian Eisel
noreply at git.blender.org
Sun Dec 23 12:39:14 CET 2018
Commit: 6f6ad48c25fc7964d6b3859a97224134787372b5
Author: Julian Eisel
Date: Sun Dec 23 12:38:43 2018 +0100
Branches: userpref_redesign
https://developer.blender.org/rB6f6ad48c25fc7964d6b3859a97224134787372b5
Merge branch 'master' into userpref_redesign
===================================================================
===================================================================
diff --cc release/scripts/modules/bpy/utils/__init__.py
index 9ef89fa365f,5fbff2eb51b..b4c8c0899ac
--- a/release/scripts/modules/bpy/utils/__init__.py
+++ b/release/scripts/modules/bpy/utils/__init__.py
@@@ -572,7 -572,7 +572,7 @@@ def preset_find(name, preset_path, disp
def keyconfig_init():
# Key configuration initialization and refresh, called from the Blender
# window manager on startup and refresh.
- active_config = _user_preferences.keymap.active_keyconfig
- active_config = _preferences.inputs.active_keyconfig
++ active_config = _preferences.keymap.active_keyconfig
# Load the default key configuration.
default_filepath = preset_find("blender", "keyconfig")
diff --cc release/scripts/modules/rna_keymap_ui.py
index 57a00895568,3a44745e01b..6a47d69a0bb
--- a/release/scripts/modules/rna_keymap_ui.py
+++ b/release/scripts/modules/rna_keymap_ui.py
@@@ -423,14 -413,14 +423,14 @@@ def draw_keymaps(context, layout)
box = col.box()
row = box.row(align=True)
- userpref = context.user_preferences
- keymappref = userpref.keymap
- prefs = context.preferences
- inputs = prefs.inputs
- show_ui_keyconfig = inputs.show_ui_keyconfig
++ pref = context.preferences
++ keymappref = pref.keymap
+ show_ui_keyconfig = keymappref.show_ui_keyconfig
row.prop(
- inputs,
+ keymappref,
"show_ui_keyconfig",
text="",
- icon='TRIA_DOWN' if show_ui_keyconfig else 'TRIA_RIGHT',
+ icon='DISCLOSURE_TRI_DOWN' if show_ui_keyconfig else 'DISCLOSURE_TRI_RIGHT',
emboss=False,
)
row.label(text="Preferences")
diff --cc release/scripts/startup/bl_ui/space_userpref.py
index 6e13d09c5fe,c4198e02187..87d0a14b51d
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@@ -43,506 -68,322 +43,506 @@@ class USERPREF_PT_navigation(Panel)
def draw(self, context):
layout = self.layout
+ layout.operator_context = 'EXEC_AREA'
- userpref = context.user_preferences
+ prefs = context.preferences
col = layout.column()
col.scale_x = 1.3
col.scale_y = 1.3
- col.prop(userpref, "active_section", expand=True)
+ col.prop(prefs, "active_section", expand=True)
+ col.separator_spacer()
+ #Doesn't work vertically yet
+
+ col.operator("wm.save_userpref")
+
-class USERPREF_PT_interface(Panel):
+class PreferencePanel(Panel):
- bl_space_type = 'USER_PREFERENCES'
+ bl_space_type = 'PREFERENCES'
- bl_label = "Interface"
bl_region_type = 'WINDOW'
- bl_options = {'HIDE_HEADER'}
+
+ def draw_props(self, context, layout):
+ # Deriving classes should implement this.
+ # TODO use abc module for abstract method support?
+ pass
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ row = layout.row()
+ row.label()
+
+ col = row.column()
+ col.ui_units_x = 50
+
+ self.draw_props(context, col)
+
+ row.label() # Needed so col above is centered.
+
+
+class USERPREF_PT_interface_display(PreferencePanel):
+ bl_label = "Display"
@classmethod
def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'INTERFACE')
+ prefs = context.preferences
+ return (prefs.active_section == 'INTERFACE')
- def draw(self, context):
- layout = self.layout
+ def draw_props(self, context, layout):
- userpref = context.user_preferences
- view = userpref.view
++ prefs = context.preferences
++ view = prefs.view
+
+ layout.prop(view, "ui_scale", text="Scale")
+ layout.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"
+ bl_options = {'DEFAULT_CLOSED'}
+ def draw_props(self, context, layout):
- userpref = context.user_preferences
- view = userpref.view
+ prefs = context.preferences
+ view = prefs.view
- split = layout.split()
- row = split.row()
- col = row.column()
+ 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")
- col.label(text="Display:")
- col.prop(view, "ui_scale", text="Scale")
- col.prop(view, "ui_line_width", text="Line Width")
- col.prop(view, "show_tooltips")
- col.prop(view, "show_object_info", text="Object Info")
- col.prop(view, "show_large_cursors")
- col.prop(view, "show_view_name", text="View Name")
- col.prop(view, "show_playback_fps", text="Playback FPS")
- col.prop(view, "object_origin_size")
- col.separator()
+class USERPREF_PT_interface_develop(PreferencePanel):
+ bl_label = "Develop"
+ bl_options = {'DEFAULT_CLOSED'}
- # col.prop(view, "show_gizmo_navigate")
+ @classmethod
+ def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'INTERFACE')
++ prefs = context.preferences
++ return (prefs.active_section == 'INTERFACE')
- sub = col.column(align=True)
+ def draw_props(self, context, layout):
- userpref = context.user_preferences
- view = userpref.view
++ prefs = context.preferences
++ view = prefs.view
+
+ layout.prop(view, "show_tooltips_python")
+ layout.prop(view, "show_developer_ui")
+
+
+class USERPREF_PT_interface_view_manipulation(PreferencePanel):
+ bl_label = "View Manipulation"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'INTERFACE')
++ prefs = context.preferences
++ return (prefs.active_section == 'INTERFACE')
+
+ def draw_props(self, context, layout):
- userpref = context.user_preferences
- view = userpref.view
++ prefs = context.preferences
++ view = prefs.view
- sub.label(text="3D Viewport Axis:")
- sub.row().prop(view, "mini_axis_type", text="")
+ layout.prop(view, "smooth_view")
+ layout.prop(view, "rotation_angle")
- sub = col.column(align=True)
+ layout.separator()
+
+ layout.prop(view, "use_mouse_depth_cursor")
+ layout.prop(view, "use_cursor_lock_adjust")
+
+ layout.separator()
+
+ layout.prop(view, "use_auto_perspective")
+ layout.prop(view, "use_mouse_depth_navigate")
+
+ layout.separator()
+
+ layout.prop(view, "use_zoom_to_mouse")
+ layout.prop(view, "use_rotate_around_active")
+
+ layout.separator()
+
+ layout.prop(view, "use_camera_lock_parent")
+
+
+class USERPREF_PT_interface_viewports(PreferencePanel):
+ bl_label = "Viewports"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
- userpref = context.user_preferences
- return (userpref.active_section == 'INTERFACE')
++ 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):
- userpref = context.user_preferences
- view = userpref.view
++ prefs = context.preferences
++ view = prefs.view
+
+ layout.prop(view, "object_origin_size")
+
+ layout.separator()
+
+ layout.prop(view, "mini_axis_type", text="3D Viewport Axis")
+
+ sub = layout.column()
sub.active = view.mini_axis_type == 'MINIMAL'
sub.prop(view, "mini_axis_size", text="Size")
sub.prop(view, "mini_axis_brightness", text="Brightness")
- col.separator()
+ layout.separator()
- # Toolbox doesn't exist yet
- # col.label(text="Toolbox:")
- #col.prop(view, "show_column_layout")
- #col.label(text="Open Toolbox Delay:")
- #col.prop(view, "open_left_mouse_delay", text="Hold LMB")
- #col.prop(view, "open_right_mouse_delay", text="Hold RMB")
- col.prop(view, "show_gizmo", text="Gizmos")
- sub = col.column()
- sub.active = view.show_gizmo
- sub.prop(view, "gizmo_size", text="Size")
+ layout.prop(view, "gizmo_size", text="Gizmo Size")
- col.separator()
- col.label(text="Development:")
- col.prop(view, "show_tooltips_python")
- col.prop(view, "show_developer_ui")
+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"
- row = split.row()
- row.separator()
- col = row.column()
+ def draw_header(self, context):
- userpref = context.user_preferences
- system = userpref.system
++ prefs = context.preferences
++ system = prefs.system
+
+ self.layout.prop(system, "use_weight_color_range", text="")
+
+ def draw_props(self, context, layout):
- userpref = context.user_preferences
- system = userpref.system
++ prefs = context.preferences
++ system = prefs.system
- col.label(te
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list