2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-08-18 12:58:51 +00:00
|
|
|
import bpy
|
2018-02-01 14:58:05 +11:00
|
|
|
from bpy.types import (
|
|
|
|
Header,
|
|
|
|
Menu,
|
|
|
|
Panel,
|
|
|
|
)
|
2013-02-10 10:29:38 +00:00
|
|
|
from bpy.app.translations import pgettext_iface as iface_
|
2019-05-09 10:09:14 +02:00
|
|
|
from bpy.app.translations import contexts as i18n_contexts
|
2013-02-10 09:09:26 +00:00
|
|
|
|
2011-06-24 03:30:50 +00:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Main Header
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_HT_header(Header):
|
2018-12-21 12:47:44 +11:00
|
|
|
bl_space_type = 'PREFERENCES'
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-05-13 15:59:27 +10:00
|
|
|
@staticmethod
|
2019-05-28 16:22:21 +10:00
|
|
|
def draw_buttons(layout, context):
|
2019-05-14 10:00:00 +10:00
|
|
|
prefs = context.preferences
|
|
|
|
|
2019-05-19 19:02:21 +02:00
|
|
|
layout.operator_context = 'EXEC_AREA'
|
2019-05-13 15:59:27 +10:00
|
|
|
|
2019-07-17 09:29:28 +10:00
|
|
|
if prefs.use_preferences_save and (not bpy.app.use_userpref_skip_save_on_exit):
|
|
|
|
pass
|
2019-06-12 12:21:21 +10:00
|
|
|
else:
|
2019-08-10 00:06:54 +10:00
|
|
|
# Show '*' to let users know the preferences have been modified.
|
2020-03-09 19:53:59 +01:00
|
|
|
layout.operator(
|
2019-08-10 00:06:54 +10:00
|
|
|
"wm.save_userpref",
|
|
|
|
text="Save Preferences{:s}".format(" *" if prefs.is_dirty else ""),
|
|
|
|
)
|
2019-05-13 15:59:27 +10:00
|
|
|
|
|
|
|
def draw(self, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
layout = self.layout
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.operator_context = 'EXEC_AREA'
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2018-11-27 14:19:00 +01:00
|
|
|
layout.template_header()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2020-03-09 19:53:59 +01:00
|
|
|
USERPREF_MT_editor_menus.draw_collapsible(context, layout)
|
|
|
|
|
2019-01-17 14:31:18 +01:00
|
|
|
layout.separator_spacer()
|
2020-03-09 19:53:59 +01:00
|
|
|
|
2019-05-13 15:59:27 +10:00
|
|
|
self.draw_buttons(layout, context)
|
2019-01-17 14:31:18 +01:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Main Navigation Bar
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
class USERPREF_PT_navigation_bar(Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Preferences Navigation"
|
2018-12-21 12:47:44 +11:00
|
|
|
bl_space_type = 'PREFERENCES'
|
2018-11-25 16:21:35 +01:00
|
|
|
bl_region_type = 'NAVIGATION_BAR'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2018-12-21 12:47:44 +11:00
|
|
|
prefs = context.preferences
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-11-25 16:21:35 +01:00
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.scale_x = 1.3
|
|
|
|
col.scale_y = 1.3
|
2018-12-21 12:47:44 +11:00
|
|
|
col.prop(prefs, "active_section", expand=True)
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2020-03-09 19:53:59 +01:00
|
|
|
class USERPREF_MT_editor_menus(Menu):
|
|
|
|
bl_idname = "USERPREF_MT_editor_menus"
|
|
|
|
bl_label = ""
|
|
|
|
|
|
|
|
def draw(self, _context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.menu("USERPREF_MT_view")
|
|
|
|
layout.menu("USERPREF_MT_save_load", text="Preferences")
|
|
|
|
|
|
|
|
|
|
|
|
class USERPREF_MT_view(Menu):
|
|
|
|
bl_label = "View"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.menu("INFO_MT_area")
|
|
|
|
|
|
|
|
|
2019-05-15 18:39:41 +10:00
|
|
|
class USERPREF_MT_save_load(Menu):
|
|
|
|
bl_label = "Save & Load"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
prefs = context.preferences
|
|
|
|
|
2019-08-11 17:51:09 +10:00
|
|
|
row = layout.row()
|
|
|
|
row.active = not bpy.app.use_userpref_skip_save_on_exit
|
|
|
|
row.prop(prefs, "use_preferences_save", text="Auto-Save Preferences")
|
2019-05-15 18:39:41 +10:00
|
|
|
|
|
|
|
layout.separator()
|
2019-05-19 19:02:21 +02:00
|
|
|
|
|
|
|
layout.operator_context = 'EXEC_AREA'
|
2019-05-15 18:39:41 +10:00
|
|
|
if prefs.use_preferences_save:
|
2019-07-17 09:29:28 +10:00
|
|
|
layout.operator("wm.save_userpref", text="Save Preferences")
|
2019-05-15 18:39:41 +10:00
|
|
|
sub_revert = layout.column(align=True)
|
|
|
|
sub_revert.active = prefs.is_dirty
|
2019-07-17 09:29:28 +10:00
|
|
|
sub_revert.operator("wm.read_userpref", text="Revert to Saved Preferences")
|
2019-05-19 19:02:21 +02:00
|
|
|
|
|
|
|
layout.operator_context = 'INVOKE_AREA'
|
2019-07-17 09:29:28 +10:00
|
|
|
layout.operator("wm.read_factory_userpref", text="Load Factory Preferences")
|
2019-05-15 18:39:41 +10:00
|
|
|
|
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
class USERPREF_PT_save_preferences(Panel):
|
|
|
|
bl_label = "Save Preferences"
|
2018-12-21 12:47:44 +11:00
|
|
|
bl_space_type = 'PREFERENCES'
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_region_type = 'EXECUTE'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-17 14:31:18 +01:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
# Hide when header is visible
|
|
|
|
for region in context.area.regions:
|
|
|
|
if region.type == 'HEADER' and region.height <= 1:
|
|
|
|
return True
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
2019-05-13 15:59:27 +10:00
|
|
|
def draw(self, context):
|
2020-03-09 19:53:59 +01:00
|
|
|
layout = self.layout.row()
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.operator_context = 'EXEC_AREA'
|
|
|
|
|
2020-03-09 19:53:59 +01:00
|
|
|
layout.menu("USERPREF_MT_save_load", text="", icon='COLLAPSEMENU')
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-05-28 16:22:21 +10:00
|
|
|
USERPREF_HT_header.draw_buttons(layout, context)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Min-In Helpers
|
|
|
|
|
2019-03-13 13:24:46 +11:00
|
|
|
# Panel mix-in.
|
2019-12-19 13:21:41 +11:00
|
|
|
class CenterAlignMixIn:
|
2019-01-04 21:40:16 +01:00
|
|
|
"""
|
|
|
|
Base class for panels to center align contents with some horizontal margin.
|
2019-12-19 13:21:41 +11:00
|
|
|
Deriving classes need to implement a ``draw_centered(context, layout)`` function.
|
2019-01-04 21:40:16 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
width = context.region.width
|
2019-01-17 02:01:58 +01:00
|
|
|
ui_scale = context.preferences.system.ui_scale
|
2019-12-19 13:21:41 +11:00
|
|
|
# No horizontal margin if region is rather small.
|
|
|
|
is_wide = width > (350 * ui_scale)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
row = layout.row()
|
2019-12-19 13:21:41 +11:00
|
|
|
if is_wide:
|
2019-01-04 21:40:16 +01:00
|
|
|
row.label() # Needed so col below is centered.
|
|
|
|
|
|
|
|
col = row.column()
|
|
|
|
col.ui_units_x = 50
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
# Implemented by sub-classes.
|
|
|
|
self.draw_centered(context, col)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
if is_wide:
|
2019-01-04 21:40:16 +01:00
|
|
|
row.label() # Needed so col above is centered.
|
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Interface Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class InterfacePanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "interface"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_display(InterfacePanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Display"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
2009-12-17 01:21:55 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(view, "ui_scale", text="Resolution Scale")
|
|
|
|
col.prop(view, "ui_line_width", text="Line Width")
|
|
|
|
col.prop(view, "show_splash", text="Splash Screen")
|
|
|
|
col.prop(view, "show_developer_ui")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Tooltips")
|
|
|
|
col.prop(view, "show_tooltips")
|
|
|
|
col.prop(view, "show_tooltips_python")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_text(InterfacePanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Text Rendering"
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-08-14 19:27:59 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
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()
|
2019-01-04 21:40:16 +01:00
|
|
|
sub.active = view.use_text_antialiasing
|
|
|
|
sub.prop(view, "text_hinting", text="Hinting")
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow.prop(view, "font_path_ui")
|
|
|
|
flow.prop(view, "font_path_ui_mono")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Translation"
|
2019-05-09 10:09:14 +02:00
|
|
|
bl_translation_context = i18n_contexts.id_windowmanager
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2019-12-19 13:21:41 +11:00
|
|
|
return bpy.app.build_options.international
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
layout.prop(view, "language")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Affect")
|
|
|
|
col.active = (bpy.app.translations.locale != 'en_US')
|
|
|
|
col.prop(view, "use_translate_tooltips", text="Tooltips")
|
|
|
|
col.prop(view, "use_translate_interface", text="Interface")
|
|
|
|
col.prop(view, "use_translate_new_dataname", text="New Data")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_editors(InterfacePanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Editors"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
2019-01-16 18:49:31 +01:00
|
|
|
system = prefs.system
|
2010-01-31 14:46:28 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(system, "use_region_overlap")
|
|
|
|
col.prop(view, "show_layout_ui", text="Corner Splitting")
|
|
|
|
col.prop(view, "show_navigate_ui")
|
|
|
|
col.prop(view, "color_picker_type")
|
|
|
|
col.row().prop(view, "header_align")
|
|
|
|
col.prop(view, "factor_display_type")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_temporary_windows(InterfacePanel, CenterAlignMixIn, Panel):
|
2019-09-18 14:32:21 +02:00
|
|
|
bl_label = "Temporary Windows"
|
|
|
|
bl_parent_id = "USERPREF_PT_interface_editors"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-09-18 14:32:21 +02:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(view, "render_display_type", text="Render in")
|
|
|
|
col.prop(view, "filebrowser_display_type", text="File Browser")
|
2019-09-18 14:32:21 +02:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_menus(InterfacePanel, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Menus"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2013-12-02 15:23:06 +01:00
|
|
|
|
2019-01-18 11:31:26 +01:00
|
|
|
def draw(self, context):
|
|
|
|
pass
|
2018-06-25 12:58:24 +02:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_menus_mouse_over(InterfacePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Open on Mouse Over"
|
|
|
|
bl_parent_id = "USERPREF_PT_interface_menus"
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw_header(self, context):
|
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
2018-01-11 16:08:55 +11:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
self.layout.prop(view, "use_mouse_over_open", text="")
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
|
|
|
layout.active = view.use_mouse_over_open
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
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")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_interface_menus_pie(InterfacePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Pie Menus"
|
|
|
|
bl_parent_id = "USERPREF_PT_interface_menus"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
flow.prop(view, "pie_animation_timeout")
|
2019-01-10 15:46:44 +01:00
|
|
|
flow.prop(view, "pie_tap_timeout")
|
2019-01-06 21:51:07 +01:00
|
|
|
flow.prop(view, "pie_initial_timeout")
|
|
|
|
flow.prop(view, "pie_menu_radius")
|
|
|
|
flow.prop(view, "pie_menu_threshold")
|
|
|
|
flow.prop(view, "pie_menu_confirm")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Editing Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class EditingPanel:
|
2019-01-18 11:31:26 +01:00
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
2019-12-19 13:21:41 +11:00
|
|
|
bl_context = "editing"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
|
|
|
|
class USERPREF_PT_edit_objects(EditingPanel, Panel):
|
|
|
|
bl_label = "Objects"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-18 11:31:26 +01:00
|
|
|
def draw(self, context):
|
|
|
|
pass
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-03-20 10:44:13 +11:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_objects_new(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-18 11:31:26 +01:00
|
|
|
bl_label = "New Objects"
|
|
|
|
bl_parent_id = "USERPREF_PT_edit_objects"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2018-12-21 12:47:44 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2018-08-14 19:27:59 +02:00
|
|
|
|
2019-01-18 11:31:26 +01:00
|
|
|
flow.prop(edit, "material_link", text="Link Materials to")
|
|
|
|
flow.prop(edit, "object_align", text="Align to")
|
|
|
|
flow.prop(edit, "use_enter_edit_mode", text="Enter Edit Mode")
|
2020-05-12 10:59:41 +02:00
|
|
|
flow.prop(edit, "collection_instance_empty_size", text="Instance Empty Size")
|
2009-12-08 19:08:35 +00:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_objects_duplicate_data(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Duplicate Data"
|
2019-01-06 12:56:18 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_edit_objects"
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
layout.use_property_split = False
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(edit, "use_duplicate_action", text="Action")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "use_duplicate_armature", text="Armature")
|
2019-01-04 21:40:16 +01:00
|
|
|
col.prop(edit, "use_duplicate_curve", text="Curve")
|
2019-10-24 19:06:44 +11:00
|
|
|
# col.prop(edit, "use_duplicate_fcurve", text="F-Curve") # Not implemented.
|
2020-03-17 14:41:48 +01:00
|
|
|
col.prop(edit, "use_duplicate_grease_pencil", text="Grease Pencil")
|
|
|
|
if hasattr(edit, "use_duplicate_hair"):
|
|
|
|
col.prop(edit, "use_duplicate_hair", text="Hair")
|
2018-06-27 14:41:53 +02:00
|
|
|
col.prop(edit, "use_duplicate_light", text="Light")
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column()
|
2020-03-17 14:41:48 +01:00
|
|
|
col.prop(edit, "use_duplicate_lightprobe", text="Light Probe")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "use_duplicate_material", text="Material")
|
2019-01-04 21:40:16 +01:00
|
|
|
col.prop(edit, "use_duplicate_mesh", text="Mesh")
|
|
|
|
col.prop(edit, "use_duplicate_metaball", text="Metaball")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "use_duplicate_particle", text="Particle")
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column()
|
2020-03-17 14:41:48 +01:00
|
|
|
if hasattr(edit, "use_duplicate_pointcloud"):
|
|
|
|
col.prop(edit, "use_duplicate_pointcloud", text="Point Cloud")
|
2019-01-04 21:40:16 +01:00
|
|
|
col.prop(edit, "use_duplicate_surface", text="Surface")
|
|
|
|
col.prop(edit, "use_duplicate_text", text="Text")
|
2019-10-24 19:06:44 +11:00
|
|
|
# col.prop(edit, "use_duplicate_texture", text="Texture") # Not implemented.
|
2020-03-17 14:41:48 +01:00
|
|
|
col.prop(edit, "use_duplicate_volume", text="Volume")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_cursor(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-18 11:31:26 +01:00
|
|
|
bl_label = "3D Cursor"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-18 11:31:26 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(edit, "use_mouse_depth_cursor")
|
|
|
|
col.prop(edit, "use_cursor_lock_adjust")
|
2019-01-18 11:31:26 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_gpencil(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Grease Pencil"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Distance")
|
|
|
|
col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan")
|
|
|
|
col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_annotations(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Annotations"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
2009-10-31 19:31:45 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(edit, "grease_pencil_default_color", text="Default Color")
|
|
|
|
col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-03-20 10:44:13 +11:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_weight_paint(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Weight Paint"
|
2019-01-18 11:31:26 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-16 18:49:31 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
layout.use_property_split = False
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
layout.prop(view, "use_weight_color_range", text="Use Custom Colors")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = view.use_weight_color_range
|
|
|
|
col.template_color_ramp(view, "weight_color_range", expand=True)
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_edit_misc(EditingPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Miscellaneous"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2014-09-30 18:29:32 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
|
|
|
|
col.prop(edit, "node_margin", text="Node Auto-offset Margin")
|
2019-01-06 12:56:18 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Animation Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class AnimationPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "animation"
|
2019-01-06 12:56:18 +01:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_animation_timeline(AnimationPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Timeline"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2019-01-16 18:49:31 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
2019-01-17 12:41:38 +01:00
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(edit, "use_negative_frames")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
|
|
|
|
col.prop(view, "timecode_style")
|
|
|
|
col.prop(view, "view_frame_type")
|
2019-01-16 18:49:31 +01:00
|
|
|
if view.view_frame_type == 'SECONDS':
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(view, "view_frame_seconds")
|
2019-01-16 18:49:31 +01:00
|
|
|
elif view.view_frame_type == 'KEYFRAMES':
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(view, "view_frame_keyframes")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_animation_keyframes(AnimationPanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Keyframes"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-06 12:56:18 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(edit, "use_visual_keying")
|
|
|
|
col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Auto-Keyframing")
|
|
|
|
col.prop(edit, "use_auto_keying_warning", text="Show Warning")
|
|
|
|
col.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
|
|
|
|
col.prop(edit, "use_auto_keying", text="Enable in New Scenes")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_animation_fcurves(AnimationPanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "F-Curves"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-16 18:49:31 +01:00
|
|
|
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-Curve Visibility")
|
2019-10-01 21:38:44 +03:00
|
|
|
flow.prop(edit, "fcurve_new_auto_smoothing", text="Default Smoothing Mode")
|
2019-01-16 18:49:31 +01:00
|
|
|
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")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# System Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class SystemPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "system"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_system_sound(SystemPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Sound"
|
2020-04-17 17:56:54 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-12-19 13:21:41 +11:00
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
layout.prop(system, "audio_device", expand=False)
|
2019-01-06 21:51:07 +01:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
sub = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False)
|
2017-09-02 15:42:29 +10:00
|
|
|
sub.active = system.audio_device not in {'NONE', 'Null'}
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(system, "audio_channels", text="Channels")
|
|
|
|
sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
|
|
|
|
sub.prop(system, "audio_sample_rate", text="Sample Rate")
|
|
|
|
sub.prop(system, "audio_sample_format", text="Sample Format")
|
2009-12-13 13:59:16 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_system_cycles_devices(SystemPanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Cycles Render Devices"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
|
|
|
|
col = layout.column()
|
2019-01-16 18:49:31 +01:00
|
|
|
col.use_property_split = False
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2016-11-24 11:14:45 +11:00
|
|
|
if bpy.app.build_options.cycles:
|
2018-12-21 12:47:44 +11:00
|
|
|
addon = prefs.addons.get("cycles")
|
2016-11-24 11:14:45 +11:00
|
|
|
if addon is not None:
|
|
|
|
addon.preferences.draw_impl(col, context)
|
|
|
|
del addon
|
2016-11-19 01:15:08 +01:00
|
|
|
|
2018-11-26 14:21:24 +01:00
|
|
|
# NOTE: Disabled for until GPU side of OpenSubdiv is brought back.
|
2019-01-11 10:49:50 +11:00
|
|
|
# system = prefs.system
|
2018-11-26 14:21:24 +01:00
|
|
|
# if hasattr(system, "opensubdiv_compute_type"):
|
|
|
|
# col.label(text="OpenSubdiv compute:")
|
|
|
|
# col.row().prop(system, "opensubdiv_compute_type", text="")
|
2015-07-20 16:08:06 +02:00
|
|
|
|
2013-12-31 18:09:20 -06:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel):
|
2019-12-19 13:20:37 +11:00
|
|
|
bl_label = "Memory & Limits"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-12-19 13:20:37 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
|
|
|
edit = prefs.edit
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(edit, "undo_steps", text="Undo Steps")
|
|
|
|
col.prop(edit, "undo_memory_limit", text="Undo Memory Limit")
|
|
|
|
col.prop(edit, "use_global_undo")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(system, "scrollback", text="Console Scrollback Lines")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(system, "texture_time_out", text="Texture Time Out")
|
|
|
|
col.prop(system, "texture_collection_rate", text="Garbage Collection Rate")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(system, "vbo_time_out", text="Vbo Time Out")
|
|
|
|
col.prop(system, "vbo_collection_rate", text="Garbage Collection Rate")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
|
2020-04-17 17:56:54 +02:00
|
|
|
class USERPREF_PT_system_video_sequencer(SystemPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Video Sequencer"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
|
|
|
edit = prefs.edit
|
|
|
|
|
|
|
|
layout.prop(system, "memory_cache_limit")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2020-04-17 17:56:54 +02:00
|
|
|
layout.prop(system, "use_sequencer_disk_cache")
|
|
|
|
col = layout.column()
|
|
|
|
col.active = system.use_sequencer_disk_cache
|
|
|
|
col.prop(system, "sequencer_disk_cache_dir", text="Directory")
|
|
|
|
col.prop(system, "sequencer_disk_cache_size_limit", text="Cache Limit")
|
|
|
|
col.prop(system, "sequencer_disk_cache_compression", text="Compression")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Viewport Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class ViewportPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "viewport"
|
2014-07-23 15:24:07 +02:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_viewport_display(ViewportPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Display"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2019-01-16 18:49:31 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
view = prefs.view
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Show")
|
|
|
|
col.prop(view, "show_object_info", text="Object Info")
|
|
|
|
col.prop(view, "show_view_name", text="View Name")
|
|
|
|
col.prop(view, "show_playback_fps", text="Playback FPS")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
2019-05-04 14:03:51 +02:00
|
|
|
col.prop(view, "gizmo_size")
|
2019-05-09 21:35:52 +10:00
|
|
|
col.prop(view, "lookdev_sphere_size")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.separator()
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
col.prop(view, "mini_axis_type", text="3D Viewport Axis")
|
|
|
|
|
|
|
|
if view.mini_axis_type == 'MINIMAL':
|
2019-06-25 21:34:21 +10:00
|
|
|
col.prop(view, "mini_axis_size", text="Size")
|
|
|
|
col.prop(view, "mini_axis_brightness", text="Brightness")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_viewport_quality(ViewportPanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Quality"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
2013-12-31 18:09:20 -06:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(system, "viewport_aa")
|
2019-01-06 21:51:07 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Smooth Wires")
|
|
|
|
col.prop(system, "use_overlay_smooth_wire", text="Overlay")
|
|
|
|
col.prop(system, "use_edit_mode_smooth_wire", text="Edit Mode")
|
2013-12-31 18:09:20 -06:00
|
|
|
|
2018-06-18 08:51:29 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_viewport_textures(ViewportPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Textures"
|
2013-12-31 18:09:20 -06:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
2009-12-15 14:22:34 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(system, "gl_texture_limit", text="Limit Size")
|
|
|
|
col.prop(system, "anisotropic_filter")
|
|
|
|
col.prop(system, "gl_clip_alpha", slider=True)
|
|
|
|
col.prop(system, "image_draw_method", text="Image Display Method")
|
2019-01-06 21:51:07 +01:00
|
|
|
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_viewport_selection(ViewportPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Selection"
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
2009-12-17 01:21:55 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
layout.prop(system, "use_select_pick_depth")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Theme Panels
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class ThemePanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "themes"
|
|
|
|
|
|
|
|
|
2012-01-10 15:08:12 +00:00
|
|
|
class USERPREF_MT_interface_theme_presets(Menu):
|
|
|
|
bl_label = "Presets"
|
|
|
|
preset_subdir = "interface_theme"
|
|
|
|
preset_operator = "script.execute_preset"
|
|
|
|
preset_type = 'XML'
|
2013-06-07 00:27:21 +00:00
|
|
|
preset_xml_map = (
|
2018-12-21 12:47:44 +11:00
|
|
|
("preferences.themes[0]", "Theme"),
|
|
|
|
("preferences.ui_styles[0]", "ThemeStyle"),
|
2018-02-01 14:58:05 +11:00
|
|
|
)
|
2012-01-10 15:08:12 +00:00
|
|
|
draw = Menu.draw_preset
|
|
|
|
|
2019-04-19 07:51:14 +02:00
|
|
|
@staticmethod
|
2018-10-10 18:11:11 +02:00
|
|
|
def reset_cb(context):
|
2019-03-02 00:52:00 +11:00
|
|
|
bpy.ops.preferences.reset_default_theme()
|
2018-10-08 19:19:05 +02:00
|
|
|
|
2012-01-10 15:08:12 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme(ThemePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Themes"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-11-02 17:18:17 +00:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
def draw(self, _context):
|
2019-01-04 21:40:16 +01:00
|
|
|
layout = self.layout
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2019-01-16 18:42:26 +01:00
|
|
|
split = layout.split(factor=0.6)
|
|
|
|
|
|
|
|
row = split.row(align=True)
|
|
|
|
row.menu("USERPREF_MT_interface_theme_presets", text=USERPREF_MT_interface_theme_presets.bl_label)
|
|
|
|
row.operator("wm.interface_theme_preset_add", text="", icon='ADD')
|
|
|
|
row.operator("wm.interface_theme_preset_add", text="", icon='REMOVE').remove_active = True
|
2010-06-26 22:23:54 +00:00
|
|
|
|
2019-01-16 18:42:26 +01:00
|
|
|
row = split.row(align=True)
|
2019-03-02 00:21:05 +11:00
|
|
|
row.operator("preferences.theme_install", text="Install...", icon='IMPORT')
|
2019-03-02 00:52:00 +11:00
|
|
|
row.operator("preferences.reset_default_theme", text="Reset", icon='LOOP_BACK')
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2010-06-26 22:23:54 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_user_interface(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "User Interface"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
def draw_header(self, _context):
|
2019-01-04 21:40:16 +01:00
|
|
|
layout = self.layout
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.label(icon='WORKSPACE')
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw(self, context):
|
|
|
|
pass
|
2013-06-06 20:36:28 +00:00
|
|
|
|
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# Base class for dynamically defined widget color panels.
|
2019-12-19 13:21:41 +11:00
|
|
|
# This is not registered.
|
2019-03-13 13:24:46 +11:00
|
|
|
class PreferenceThemeWidgetColorPanel:
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw(self, context):
|
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
|
|
|
widget_style = getattr(ui, self.wcol)
|
|
|
|
layout = self.layout
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.use_property_split = True
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-09-12 16:03:49 +02:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=2, even_columns=True, even_rows=False, align=False)
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-09-12 16:03:49 +02:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(widget_style, "text")
|
|
|
|
col.prop(widget_style, "text_sel", text="Selected")
|
2019-01-04 21:40:16 +01:00
|
|
|
col.prop(widget_style, "item", slider=True)
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-09-12 16:03:49 +02:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(widget_style, "inner", slider=True)
|
|
|
|
col.prop(widget_style, "inner_sel", text="Selected", slider=True)
|
|
|
|
col.prop(widget_style, "outline")
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2019-09-12 16:03:49 +02:00
|
|
|
col.separator()
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-09-12 16:03:49 +02:00
|
|
|
col.prop(widget_style, "roundness")
|
2013-06-06 20:36:28 +00:00
|
|
|
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
# Base class for dynamically defined widget color panels.
|
|
|
|
# This is not registered.
|
2019-09-12 16:03:49 +02:00
|
|
|
class PreferenceThemeWidgetShadePanel:
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
|
|
|
widget_style = getattr(ui, self.wcol)
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.active = widget_style.show_shaded
|
|
|
|
col.prop(widget_style, "shadetop", text="Shade Top")
|
|
|
|
col.prop(widget_style, "shadedown", text="Down")
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
|
|
|
widget_style = getattr(ui, self.wcol)
|
|
|
|
|
|
|
|
self.layout.prop(widget_style, "show_shaded", text="")
|
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_interface_state(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "State"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2018-12-21 12:47:44 +11:00
|
|
|
theme = context.preferences.themes[0]
|
2019-01-04 21:40:16 +01:00
|
|
|
ui_state = theme.user_interface.wcol_state
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2012-01-10 16:30:16 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui_state, "inner_anim")
|
|
|
|
col.prop(ui_state, "inner_anim_sel")
|
2012-01-10 16:30:16 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui_state, "inner_driven")
|
|
|
|
col.prop(ui_state, "inner_driven_sel")
|
2012-01-10 16:30:16 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui_state, "inner_key")
|
|
|
|
col.prop(ui_state, "inner_key_sel")
|
2012-01-10 16:30:16 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui_state, "inner_overridden")
|
|
|
|
col.prop(ui_state, "inner_overridden_sel")
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui_state, "inner_changed")
|
|
|
|
col.prop(ui_state, "inner_changed_sel")
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui_state, "blend")
|
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_interface_styles(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Styles"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
flow.prop(ui, "menu_shadow_fac")
|
2020-02-28 11:35:36 +01:00
|
|
|
flow.prop(ui, "menu_shadow_width")
|
2019-01-04 21:40:16 +01:00
|
|
|
flow.prop(ui, "icon_alpha")
|
|
|
|
flow.prop(ui, "icon_saturation")
|
|
|
|
flow.prop(ui, "editor_outline")
|
2019-11-25 08:36:05 -08:00
|
|
|
flow.prop(ui, "widget_text_cursor")
|
2019-01-04 21:40:16 +01:00
|
|
|
flow.prop(ui, "widget_emboss")
|
|
|
|
|
|
|
|
|
2020-03-23 16:00:42 +01:00
|
|
|
class USERPREF_PT_theme_interface_transparent_checker(ThemePanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Transparent Checkerboard"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
|
|
|
|
|
|
|
flow = layout.grid_flow(
|
|
|
|
row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
flow.prop(ui, "transparent_checker_primary")
|
|
|
|
flow.prop(ui, "transparent_checker_secondary")
|
|
|
|
flow.prop(ui, "transparent_checker_size")
|
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_interface_gizmos(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Axis & Gizmo Colors"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=True, align=False)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(ui, "axis_x", text="Axis X")
|
|
|
|
col.prop(ui, "axis_y", text="Y")
|
|
|
|
col.prop(ui, "axis_z", text="Z")
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(ui, "gizmo_primary")
|
|
|
|
col.prop(ui, "gizmo_secondary")
|
2020-03-19 11:40:04 +11:00
|
|
|
col.prop(ui, "gizmo_view_align")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(ui, "gizmo_a")
|
|
|
|
col.prop(ui, "gizmo_b")
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_interface_icons(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Icon Colors"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
theme = context.preferences.themes[0]
|
|
|
|
ui = theme.user_interface
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-05-09 17:07:06 +02:00
|
|
|
flow.prop(ui, "icon_scene")
|
2019-01-04 21:40:16 +01:00
|
|
|
flow.prop(ui, "icon_collection")
|
|
|
|
flow.prop(ui, "icon_object")
|
|
|
|
flow.prop(ui, "icon_object_data")
|
|
|
|
flow.prop(ui, "icon_modifier")
|
|
|
|
flow.prop(ui, "icon_shading")
|
2019-09-10 08:07:39 -07:00
|
|
|
flow.prop(ui, "icon_folder")
|
2019-05-09 15:53:44 +02:00
|
|
|
flow.prop(ui, "icon_border_intensity")
|
2018-04-26 21:17:33 +02:00
|
|
|
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_text_style(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Text Style"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
@staticmethod
|
|
|
|
def _ui_font_style(layout, font_style):
|
|
|
|
layout.use_property_split = True
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column()
|
|
|
|
col.row().prop(font_style, "font_kerning_style", expand=True)
|
|
|
|
col.prop(font_style, "points")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(font_style, "shadow_offset_x", text="Shadow Offset X")
|
|
|
|
col.prop(font_style, "shadow_offset_y", text="Y")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(font_style, "shadow")
|
|
|
|
col.prop(font_style, "shadow_alpha")
|
|
|
|
col.prop(font_style, "shadow_value")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
def draw_header(self, _context):
|
2019-01-04 21:40:16 +01:00
|
|
|
layout = self.layout
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.label(icon='FONTPREVIEW')
|
Pie Menus C code backend.
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 10:39:59 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
style = context.preferences.ui_styles[0]
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.label(text="Panel Title")
|
|
|
|
self._ui_font_style(layout, style.panel_title)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.separator()
|
2012-03-19 22:29:16 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.label(text="Widget")
|
|
|
|
self._ui_font_style(layout, style.widget)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.separator()
|
2010-06-09 19:12:03 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.label(text="Widget Label")
|
|
|
|
self._ui_font_style(layout, style.widget_label)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_theme_bone_color_sets(ThemePanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Bone Color Sets"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
UI: New Global Top-Bar (WIP)
== Main Features/Changes for Users
* Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars.
* Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector.
* Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here.
* Individual sections of the topbar are individually scrollable.
* Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting.
* Top-bar should scale nicely with DPI.
* The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes).
* Info editors at the top of the window and using the full window width with be replaced by the top-bar.
* In fullscreen modes, no more info editor is added on top, the top-bar replaces it.
== Technical Features/Changes
* Adds initial support for global areas
A global area is part of the window, not part of the regular screen-layout.
I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas.
* Adds a TOPBAR editor type
The editor type is hidden in the UI editor type menu.
* Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY)
* Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar.
* Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds.
The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved.
* Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code.
Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being.
NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility.
== ToDo's
It's a bit hard to predict all the ToDo's here are the known main ones:
* Add options for the new active-tool system and for operator redo to the topbar.
* Automatically hide the top-bar in fullscreen modes.
* General visual polish.
* Top-bar drag & drop support (WIP in temp-tab_drag_drop).
* Improve dynamic regions (should also fix some layout glitches).
* Make internal terminology consistent.
* Enable topbar file writing once design is more advanced.
* Address TODO's and XXX's in code :)
Thanks @brecht for the review! And @sergey for the complaining ;)
Differential Revision: D2758
2018-04-20 17:14:03 +02:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
def draw_header(self, _context):
|
2019-01-04 21:40:16 +01:00
|
|
|
layout = self.layout
|
2010-06-26 17:06:55 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.label(icon='COLOR')
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
theme = context.preferences.themes[0]
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.use_property_split = True
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
for i, ui in enumerate(theme.bone_color_sets, 1):
|
|
|
|
layout.label(text=iface_(f"Color Set {i:d}"), translate=False)
|
2010-06-26 17:06:55 +00:00
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2011-11-19 20:57:53 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
flow.prop(ui, "normal")
|
|
|
|
flow.prop(ui, "select")
|
|
|
|
flow.prop(ui, "active")
|
|
|
|
flow.prop(ui, "show_colored_constraints")
|
2012-12-20 16:50:39 +00:00
|
|
|
|
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# Base class for dynamically defined theme-space panels.
|
2019-12-19 13:21:41 +11:00
|
|
|
# This is not registered.
|
2019-03-13 13:24:46 +11:00
|
|
|
class PreferenceThemeSpacePanel:
|
2012-12-20 16:50:39 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# not essential, hard-coded UI delimiters for the theme layout
|
|
|
|
ui_delimiters = {
|
|
|
|
'VIEW_3D': {
|
|
|
|
"text_grease_pencil",
|
|
|
|
"text_keyframe",
|
|
|
|
"speaker",
|
|
|
|
"freestyle_face_mark",
|
|
|
|
"split_normal",
|
|
|
|
"bone_solid",
|
2019-12-17 16:11:31 +03:00
|
|
|
"bone_locked_weight",
|
2019-01-04 21:40:16 +01:00
|
|
|
"paint_curve_pivot",
|
|
|
|
},
|
|
|
|
'GRAPH_EDITOR': {
|
|
|
|
"handle_vertex_select",
|
|
|
|
},
|
|
|
|
'IMAGE_EDITOR': {
|
|
|
|
"paint_curve_pivot",
|
|
|
|
},
|
|
|
|
'NODE_EDITOR': {
|
|
|
|
"layout_node",
|
|
|
|
},
|
|
|
|
'CLIP_EDITOR': {
|
|
|
|
"handle_vertex_select",
|
|
|
|
}
|
|
|
|
}
|
2011-11-19 20:57:53 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# TODO theme_area should be deprecated
|
|
|
|
@staticmethod
|
|
|
|
def _theme_generic(layout, themedata, theme_area):
|
2011-11-19 20:57:53 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.use_property_split = True
|
2011-11-19 20:57:53 +00:00
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
props_type = {}
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
for prop in themedata.rna_type.properties:
|
2019-01-04 21:40:16 +01:00
|
|
|
if prop.identifier == "rna_type":
|
|
|
|
continue
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
props_type.setdefault((prop.type, prop.subtype), []).append(prop)
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
th_delimiters = PreferenceThemeSpacePanel.ui_delimiters.get(theme_area)
|
|
|
|
for props_type, props_ls in sorted(props_type.items()):
|
|
|
|
if props_type[0] == 'POINTER':
|
|
|
|
continue
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
if th_delimiters is None:
|
|
|
|
# simple, no delimiters
|
2019-01-11 10:49:50 +11:00
|
|
|
for prop in props_ls:
|
2019-01-04 21:40:16 +01:00
|
|
|
flow.prop(themedata, prop.identifier)
|
|
|
|
else:
|
Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.
The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
for prop in props_ls:
|
|
|
|
flow.prop(themedata, prop.identifier)
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
def draw_header(self, _context):
|
2019-01-04 21:40:16 +01:00
|
|
|
if hasattr(self, "icon") and self.icon != 'NONE':
|
|
|
|
layout = self.layout
|
|
|
|
layout.label(icon=self.icon)
|
2018-10-02 19:04:38 +02:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
theme = context.preferences.themes[0]
|
2018-10-02 19:04:38 +02:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
datapath_list = self.datapath.split(".")
|
|
|
|
data = theme
|
|
|
|
for datapath_item in datapath_list:
|
|
|
|
data = getattr(data, datapath_item)
|
|
|
|
PreferenceThemeSpacePanel._theme_generic(layout, data, self.theme_area)
|
2018-10-02 19:04:38 +02:00
|
|
|
|
|
|
|
|
2020-05-21 16:17:44 +10:00
|
|
|
class ThemeGenericClassGenerator:
|
2018-10-02 19:04:38 +02:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
@staticmethod
|
|
|
|
def generate_panel_classes_for_wcols():
|
|
|
|
wcols = [
|
|
|
|
("Regular", "wcol_regular"),
|
|
|
|
("Tool", "wcol_tool"),
|
|
|
|
("Toolbar Item", "wcol_toolbar_item"),
|
|
|
|
("Radio Buttons", "wcol_radio"),
|
|
|
|
("Text", "wcol_text"),
|
|
|
|
("Option", "wcol_option"),
|
|
|
|
("Toggle", "wcol_toggle"),
|
|
|
|
("Number Field", "wcol_num"),
|
|
|
|
("Value Slider", "wcol_numslider"),
|
|
|
|
("Box", "wcol_box"),
|
|
|
|
("Menu", "wcol_menu"),
|
|
|
|
("Pie Menu", "wcol_pie_menu"),
|
|
|
|
("Pulldown", "wcol_pulldown"),
|
|
|
|
("Menu Back", "wcol_menu_back"),
|
|
|
|
("Tooltip", "wcol_tooltip"),
|
|
|
|
("Menu Item", "wcol_menu_item"),
|
|
|
|
("Scroll Bar", "wcol_scroll"),
|
|
|
|
("Progress Bar", "wcol_progress"),
|
|
|
|
("List Item", "wcol_list_item"),
|
|
|
|
("Tab", "wcol_tab"),
|
|
|
|
]
|
2018-10-02 19:04:38 +02:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
for (name, wcol) in wcols:
|
|
|
|
panel_id = "USERPREF_PT_theme_interface_" + wcol
|
2019-12-19 13:21:41 +11:00
|
|
|
yield type(panel_id, (PreferenceThemeWidgetColorPanel, ThemePanel, Panel), {
|
2019-01-04 21:40:16 +01:00
|
|
|
"bl_label": name,
|
|
|
|
"bl_options": {'DEFAULT_CLOSED'},
|
|
|
|
"draw": PreferenceThemeWidgetColorPanel.draw,
|
|
|
|
"wcol": wcol,
|
|
|
|
})
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2019-09-12 16:03:49 +02:00
|
|
|
panel_shade_id = "USERPREF_PT_theme_interface_shade_" + wcol
|
2019-12-19 13:21:41 +11:00
|
|
|
yield type(panel_shade_id, (PreferenceThemeWidgetShadePanel, ThemePanel, Panel), {
|
2019-09-12 16:03:49 +02:00
|
|
|
"bl_label": "Shaded",
|
|
|
|
"bl_options": {'DEFAULT_CLOSED'},
|
|
|
|
"bl_parent_id": panel_id,
|
|
|
|
"draw": PreferenceThemeWidgetShadePanel.draw,
|
|
|
|
"wcol": wcol,
|
|
|
|
})
|
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
@staticmethod
|
|
|
|
def generate_theme_area_child_panel_classes(parent_id, rna_type, theme_area, datapath):
|
|
|
|
def generate_child_panel_classes_recurse(parent_id, rna_type, theme_area, datapath):
|
|
|
|
props_type = {}
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2019-01-11 10:49:50 +11:00
|
|
|
for prop in rna_type.properties:
|
2019-01-04 21:40:16 +01:00
|
|
|
if prop.identifier == "rna_type":
|
|
|
|
continue
|
2011-02-14 03:43:28 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
props_type.setdefault((prop.type, prop.subtype), []).append(prop)
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
for props_type, props_ls in sorted(props_type.items()):
|
|
|
|
if props_type[0] == 'POINTER':
|
2019-01-11 10:49:50 +11:00
|
|
|
for prop in props_ls:
|
2019-01-04 21:40:16 +01:00
|
|
|
new_datapath = datapath + "." + prop.identifier if datapath else prop.identifier
|
|
|
|
panel_id = parent_id + "_" + prop.identifier
|
2019-12-19 13:21:41 +11:00
|
|
|
yield type(panel_id, (PreferenceThemeSpacePanel, ThemePanel, Panel), {
|
2019-01-04 21:40:16 +01:00
|
|
|
"bl_label": rna_type.properties[prop.identifier].name,
|
|
|
|
"bl_parent_id": parent_id,
|
|
|
|
"bl_options": {'DEFAULT_CLOSED'},
|
|
|
|
"draw": PreferenceThemeSpacePanel.draw,
|
|
|
|
"theme_area": theme_area.identifier,
|
|
|
|
"datapath": new_datapath,
|
|
|
|
})
|
|
|
|
|
2019-12-16 14:29:03 +11:00
|
|
|
yield from generate_child_panel_classes_recurse(
|
|
|
|
panel_id,
|
|
|
|
prop.fixed_type,
|
|
|
|
theme_area,
|
|
|
|
new_datapath,
|
|
|
|
)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-03-13 13:03:54 +11:00
|
|
|
yield from generate_child_panel_classes_recurse(parent_id, rna_type, theme_area, datapath)
|
2011-02-14 03:43:28 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
@staticmethod
|
|
|
|
def generate_panel_classes_from_theme_areas():
|
|
|
|
from bpy.types import Theme
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
for theme_area in Theme.bl_rna.properties['theme_area'].enum_items_static:
|
|
|
|
if theme_area.identifier in {'USER_INTERFACE', 'STYLE', 'BONE_COLOR_SETS'}:
|
|
|
|
continue
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
panel_id = "USERPREF_PT_theme_" + theme_area.identifier.lower()
|
|
|
|
# Generate panel-class from theme_area
|
2019-12-19 13:21:41 +11:00
|
|
|
yield type(panel_id, (PreferenceThemeSpacePanel, ThemePanel, Panel), {
|
2019-01-04 21:40:16 +01:00
|
|
|
"bl_label": theme_area.name,
|
|
|
|
"bl_options": {'DEFAULT_CLOSED'},
|
|
|
|
"draw_header": PreferenceThemeSpacePanel.draw_header,
|
|
|
|
"draw": PreferenceThemeSpacePanel.draw,
|
|
|
|
"theme_area": theme_area.identifier,
|
|
|
|
"icon": theme_area.icon,
|
|
|
|
"datapath": theme_area.identifier.lower(),
|
|
|
|
})
|
|
|
|
|
2019-03-13 13:03:54 +11:00
|
|
|
yield from ThemeGenericClassGenerator.generate_theme_area_child_panel_classes(
|
2019-01-04 21:40:16 +01:00
|
|
|
panel_id, Theme.bl_rna.properties[theme_area.identifier.lower()].fixed_type,
|
|
|
|
theme_area, theme_area.identifier.lower())
|
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# File Paths Panels
|
|
|
|
|
2019-03-13 13:24:46 +11:00
|
|
|
# Panel mix-in.
|
|
|
|
class FilePathsPanel:
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
2019-12-19 13:21:41 +11:00
|
|
|
bl_context = "file_paths"
|
2013-01-23 16:01:35 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
|
|
|
|
class USERPREF_PT_file_paths_data(FilePathsPanel, Panel):
|
|
|
|
bl_label = "Data"
|
2013-01-23 16:01:35 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
2019-01-16 18:49:31 +01:00
|
|
|
layout.use_property_decorate = False
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
paths = context.preferences.filepaths
|
|
|
|
|
|
|
|
col = self.layout.column()
|
|
|
|
col.prop(paths, "font_directory", text="Fonts")
|
|
|
|
col.prop(paths, "texture_directory", text="Textures")
|
|
|
|
col.prop(paths, "script_directory", text="Scripts")
|
|
|
|
col.prop(paths, "sound_directory", text="Sounds")
|
|
|
|
col.prop(paths, "temporary_directory", text="Temporary Files")
|
|
|
|
|
|
|
|
|
2019-03-13 13:24:46 +11:00
|
|
|
class USERPREF_PT_file_paths_render(FilePathsPanel, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Render"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
paths = context.preferences.filepaths
|
|
|
|
|
|
|
|
col = self.layout.column()
|
|
|
|
col.prop(paths, "render_output_directory", text="Render Output")
|
|
|
|
col.prop(paths, "render_cache_directory", text="Render Cache")
|
|
|
|
|
|
|
|
|
2019-03-13 13:24:46 +11:00
|
|
|
class USERPREF_PT_file_paths_applications(FilePathsPanel, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Applications"
|
2019-01-06 21:51:07 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
paths = context.preferences.filepaths
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(paths, "image_editor", text="Image Editor")
|
|
|
|
col.prop(paths, "animation_player_preset", text="Animation Player")
|
2019-01-06 12:56:18 +01:00
|
|
|
if paths.animation_player_preset == 'CUSTOM':
|
2019-01-16 18:49:31 +01:00
|
|
|
col.prop(paths, "animation_player", text="Player")
|
2009-11-02 17:18:17 +00:00
|
|
|
|
|
|
|
|
2019-03-13 13:24:46 +11:00
|
|
|
class USERPREF_PT_file_paths_development(FilePathsPanel, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "Development"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
prefs = context.preferences
|
2019-12-19 13:21:41 +11:00
|
|
|
return prefs.view.show_developer_ui
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
paths = context.preferences.filepaths
|
|
|
|
layout.prop(paths, "i18n_branches_directory", text="I18n Branches")
|
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_saveload_autorun(FilePathsPanel, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Auto Run Python Scripts"
|
2019-01-18 11:31:26 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_saveload_blend"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw_header(self, context):
|
|
|
|
prefs = context.preferences
|
|
|
|
paths = prefs.filepaths
|
|
|
|
|
|
|
|
self.layout.prop(paths, "use_scripts_auto_execute", text="")
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
paths = prefs.filepaths
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
layout.active = paths.use_scripts_auto_execute
|
|
|
|
|
|
|
|
box = layout.box()
|
|
|
|
row = box.row()
|
|
|
|
row.label(text="Excluded Paths:")
|
|
|
|
row.operator("wm.userpref_autoexec_path_add", text="", icon='ADD', emboss=False)
|
|
|
|
for i, path_cmp in enumerate(prefs.autoexec_paths):
|
|
|
|
row = box.row()
|
|
|
|
row.prop(path_cmp, "path", text="")
|
|
|
|
row.prop(path_cmp, "use_glob", text="", icon='FILTER')
|
|
|
|
row.operator("wm.userpref_autoexec_path_remove", text="", icon='X', emboss=False).index = i
|
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Save/Load Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class SaveLoadPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "save_load"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_saveload_blend(SaveLoadPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Blend Files"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2018-12-21 12:47:44 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
paths = prefs.filepaths
|
2019-01-18 11:31:26 +01:00
|
|
|
view = prefs.view
|
2009-10-31 19:31:45 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Save")
|
|
|
|
col.prop(view, "use_save_prompt")
|
|
|
|
col.prop(paths, "use_save_preview_images")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Default to")
|
|
|
|
col.prop(paths, "use_relative_paths")
|
|
|
|
col.prop(paths, "use_file_compression")
|
|
|
|
col.prop(paths, "use_load_ui")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Text Files")
|
|
|
|
col.prop(paths, "use_tabs_as_spaces")
|
2019-01-06 21:51:07 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(paths, "save_version")
|
|
|
|
col.prop(paths, "recent_files")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_saveload_blend_autosave(SaveLoadPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Auto Save"
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_saveload_blend"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
def draw_header(self, context):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
paths = prefs.filepaths
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
self.layout.prop(paths, "use_auto_save_temporary_files", text="")
|
2019-01-06 21:51:07 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
def draw_centered(self, context, layout):
|
|
|
|
prefs = context.preferences
|
|
|
|
paths = prefs.filepaths
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = paths.use_auto_save_temporary_files
|
|
|
|
col.prop(paths, "auto_save_time", text="Timer (mins)")
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_saveload_file_browser(SaveLoadPanel, CenterAlignMixIn, Panel):
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_label = "File Browser"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-16 18:49:31 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
paths = prefs.filepaths
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(paths, "use_filter_files")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Hide")
|
|
|
|
col.prop(paths, "show_hidden_files_datablocks", text="Dot File & Datablocks")
|
|
|
|
col.prop(paths, "hide_recent_locations", text="Recent Locations")
|
|
|
|
col.prop(paths, "hide_system_bookmarks", text="System Bookmarks")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Input Panels
|
2011-08-05 14:53:13 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class InputPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "input"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2013-07-08 07:25:33 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_input_keyboard(InputPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Keyboard"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
layout.prop(inputs, "use_emulate_numpad")
|
|
|
|
layout.prop(inputs, "use_numeric_input_advanced")
|
2019-01-06 21:51:07 +01:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_input_mouse(InputPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Mouse"
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-10-03 00:20:58 +10:00
|
|
|
import sys
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
|
2019-01-06 21:51:07 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
flow.prop(inputs, "use_mouse_emulate_3_button")
|
2019-10-03 00:20:58 +10:00
|
|
|
if sys.platform[:3] != "win":
|
|
|
|
rowsub = flow.row()
|
|
|
|
rowsub.active = inputs.use_mouse_emulate_3_button
|
|
|
|
rowsub.prop(inputs, "mouse_emulate_3_button_modifier")
|
2019-01-06 21:51:07 +01:00
|
|
|
flow.prop(inputs, "use_mouse_continuous")
|
|
|
|
flow.prop(inputs, "use_drag_immediately")
|
2019-05-30 14:47:24 +10:00
|
|
|
flow.prop(inputs, "mouse_double_click_time", text="Double Click Speed")
|
|
|
|
flow.prop(inputs, "drag_threshold_mouse")
|
|
|
|
flow.prop(inputs, "drag_threshold_tablet")
|
2019-01-16 18:49:31 +01:00
|
|
|
flow.prop(inputs, "drag_threshold")
|
2019-03-20 22:14:13 +11:00
|
|
|
flow.prop(inputs, "move_threshold")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_input_tablet(InputPanel, CenterAlignMixIn, Panel):
|
2019-12-19 13:20:37 +11:00
|
|
|
bl_label = "Tablet"
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-12-19 13:20:37 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
|
|
|
|
import sys
|
|
|
|
if sys.platform[:3] == "win":
|
|
|
|
layout.prop(inputs, "tablet_api")
|
|
|
|
layout.separator()
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(inputs, "pressure_threshold_max")
|
|
|
|
col.prop(inputs, "pressure_softness")
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_input_ndof(InputPanel, CenterAlignMixIn, Panel):
|
2019-12-19 13:20:37 +11:00
|
|
|
bl_label = "NDOF"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
2019-12-19 13:21:41 +11:00
|
|
|
return inputs.use_ndof
|
2019-12-19 13:20:37 +11:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-12-19 13:20:37 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
USERPREF_PT_ndof_settings.draw_settings(layout, inputs)
|
2019-12-19 13:20:37 +11:00
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Navigation Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class NavigationPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "navigation"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_navigation_orbit(NavigationPanel, CenterAlignMixIn, Panel):
|
|
|
|
bl_label = "Orbit & Pan"
|
|
|
|
|
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
import sys
|
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
2019-01-16 18:49:31 +01:00
|
|
|
view = prefs.view
|
2015-04-07 14:08:30 +02:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
2019-01-06 21:51:07 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.row().prop(inputs, "view_rotate_method", expand=True)
|
2019-08-04 01:22:38 +10:00
|
|
|
if inputs.view_rotate_method == 'TURNTABLE':
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(inputs, "view_rotate_sensitivity_turntable")
|
2019-08-04 01:22:38 +10:00
|
|
|
else:
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(inputs, "view_rotate_sensitivity_trackball")
|
|
|
|
col.prop(inputs, "use_rotate_around_active")
|
|
|
|
|
|
|
|
col.separator()
|
2019-08-04 01:22:38 +10:00
|
|
|
|
2019-01-18 11:31:26 +01:00
|
|
|
if sys.platform == "darwin":
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction")
|
2009-11-22 16:33:47 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Auto")
|
|
|
|
col.prop(inputs, "use_auto_perspective", text="Perspective")
|
|
|
|
col.prop(inputs, "use_mouse_depth_navigate", text="Depth")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(view, "smooth_view")
|
|
|
|
col.prop(view, "rotation_angle")
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_navigation_zoom(NavigationPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Zoom"
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
2014-01-27 18:38:53 +11:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
2019-01-06 21:51:07 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.row().prop(inputs, "view_zoom_method", text="Zoom Method")
|
2011-04-22 14:47:35 +00:00
|
|
|
if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}:
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.row().prop(inputs, "view_zoom_axis")
|
|
|
|
col.prop(inputs, "use_zoom_to_mouse")
|
|
|
|
col = layout.column(heading="Invert Zoom Direction", align=True)
|
|
|
|
col.prop(inputs, "invert_mouse_zoom", text="Mouse")
|
|
|
|
col.prop(inputs, "invert_zoom_wheel", text="Wheel")
|
|
|
|
else:
|
|
|
|
col.prop(inputs, "use_zoom_to_mouse")
|
|
|
|
col.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_navigation_fly_walk(NavigationPanel, CenterAlignMixIn, Panel):
|
2019-01-06 12:56:18 +01:00
|
|
|
bl_label = "Fly & Walk"
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
layout.row().prop(inputs, "navigation_mode", expand=True)
|
2019-01-06 21:51:07 +01:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
2019-01-06 21:51:07 +01:00
|
|
|
flow.prop(inputs, "use_camera_lock_parent")
|
2013-12-03 03:14:09 -02:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_navigation_fly_walk_navigation(NavigationPanel, CenterAlignMixIn, Panel):
|
2019-01-06 12:56:18 +01:00
|
|
|
bl_label = "Walk"
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_navigation_fly_walk"
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2019-01-06 12:56:18 +01:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
prefs = context.preferences
|
|
|
|
return prefs.inputs.navigation_mode == 'WALK'
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
2017-04-10 17:44:03 -04:00
|
|
|
walk = inputs.walk_navigation
|
2013-12-03 03:14:09 -02:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(walk, "use_mouse_reverse")
|
|
|
|
col.prop(walk, "mouse_speed")
|
|
|
|
col.prop(walk, "teleport_time")
|
2017-04-10 17:44:03 -04:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(walk, "walk_speed")
|
|
|
|
col.prop(walk, "walk_speed_factor")
|
2017-04-10 17:44:03 -04:00
|
|
|
|
2013-12-03 03:14:09 -02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_navigation_fly_walk_gravity(NavigationPanel, CenterAlignMixIn, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Gravity"
|
2019-01-16 18:49:31 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_navigation_fly_walk"
|
2019-01-06 12:56:18 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
prefs = context.preferences
|
|
|
|
return prefs.inputs.navigation_mode == 'WALK'
|
2018-11-20 15:35:59 +03:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
def draw_header(self, context):
|
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
walk = inputs.walk_navigation
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
self.layout.prop(walk, "use_gravity", text="")
|
2013-07-08 07:25:33 +00:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
def draw_centered(self, context, layout):
|
2019-01-04 21:40:16 +01:00
|
|
|
prefs = context.preferences
|
|
|
|
inputs = prefs.inputs
|
|
|
|
walk = inputs.walk_navigation
|
|
|
|
|
|
|
|
layout.active = walk.use_gravity
|
2019-01-06 21:51:07 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(walk, "view_height")
|
|
|
|
col.prop(walk, "jump_height")
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# Special case, this is only exposed as a popover.
|
|
|
|
class USERPREF_PT_ndof_settings(Panel):
|
|
|
|
bl_label = "3D Mouse Settings"
|
|
|
|
bl_space_type = 'TOPBAR' # dummy.
|
|
|
|
bl_region_type = 'HEADER'
|
2020-05-21 11:42:23 -04:00
|
|
|
bl_ui_units_x = 12
|
2019-01-16 18:49:31 +01:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
@staticmethod
|
|
|
|
def draw_settings(layout, props, show_3dview_settings=True):
|
|
|
|
col = layout.column()
|
|
|
|
col.prop(props, "ndof_sensitivity", text="Pan Sensitivity")
|
|
|
|
col.prop(props, "ndof_orbit_sensitivity")
|
|
|
|
col.prop(props, "ndof_deadzone")
|
2019-01-14 17:46:49 +01:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
layout.separator()
|
2019-01-06 21:51:07 +01:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
if show_3dview_settings:
|
|
|
|
col = layout.column()
|
|
|
|
col.row().prop(props, "ndof_view_navigate_method", expand=True, text="Navigation")
|
|
|
|
col.row().prop(props, "ndof_view_rotate_method", expand=True, text="Rotation")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
layout.separator()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
col = layout.column()
|
|
|
|
if show_3dview_settings:
|
|
|
|
col.prop(props, "ndof_show_guide")
|
|
|
|
col.prop(props, "ndof_zoom_invert")
|
|
|
|
row = col.row(heading="Pan")
|
|
|
|
row.prop(props, "ndof_pan_yz_swap_axis", text="Swap Y and Z Axes")
|
2009-12-16 10:13:26 +00:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
row = layout.row(heading=("Invert Axis Pan" if show_3dview_settings else "Invert Pan Axis"))
|
2019-12-19 13:20:37 +11:00
|
|
|
for text, attr in (
|
|
|
|
("X", "ndof_panx_invert_axis"),
|
|
|
|
("Y", "ndof_pany_invert_axis"),
|
|
|
|
("Z", "ndof_panz_invert_axis"),
|
|
|
|
):
|
2020-05-21 11:42:23 -04:00
|
|
|
row.prop(props, attr, text=text, toggle=True)
|
2009-12-16 10:13:26 +00:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
if show_3dview_settings:
|
|
|
|
row = layout.row(heading="Orbit")
|
|
|
|
for text, attr in (
|
|
|
|
("X", "ndof_rotx_invert_axis"),
|
|
|
|
("Y", "ndof_roty_invert_axis"),
|
|
|
|
("Z", "ndof_rotz_invert_axis"),
|
|
|
|
):
|
|
|
|
row.prop(props, attr, text=text, toggle=True)
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
layout.separator()
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2020-05-21 11:42:23 -04:00
|
|
|
col = layout.column(heading="Fly/Walk")
|
|
|
|
col.prop(props, "ndof_lock_horizon")
|
|
|
|
col.prop(props, "ndof_fly_helicopter")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
input_prefs = context.preferences.inputs
|
|
|
|
|
|
|
|
is_view3d = context.space_data.type == 'VIEW_3D'
|
|
|
|
self.draw_settings(layout, input_prefs, is_view3d)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Key-Map Editor Panels
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class KeymapPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "keymap"
|
|
|
|
|
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
class USERPREF_MT_keyconfigs(Menu):
|
|
|
|
bl_label = "KeyPresets"
|
|
|
|
preset_subdir = "keyconfig"
|
2019-03-02 00:21:05 +11:00
|
|
|
preset_operator = "preferences.keyconfig_activate"
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
Menu.draw_preset(self, context)
|
|
|
|
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_keymap(KeymapPanel, Panel):
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_label = "Keymap"
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
from rna_keymap_ui import draw_keymaps
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
# import time
|
2018-11-18 11:16:25 +11:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# start = time.time()
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
# Keymap Settings
|
2019-01-16 18:42:26 +01:00
|
|
|
draw_keymaps(context, layout)
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# print("runtime", time.time() - start)
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Add-On Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class AddOnPanel:
|
2018-12-21 12:47:44 +11:00
|
|
|
bl_space_type = 'PREFERENCES'
|
2010-02-14 23:33:18 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
2019-12-19 13:21:41 +11:00
|
|
|
bl_context = "addons"
|
|
|
|
|
|
|
|
|
|
|
|
class USERPREF_PT_addons(AddOnPanel, Panel):
|
|
|
|
bl_label = "Add-ons"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2010-09-07 15:17:42 +00:00
|
|
|
|
2011-11-17 20:11:20 +00:00
|
|
|
_support_icon_mapping = {
|
|
|
|
'OFFICIAL': 'FILE_BLEND',
|
2018-11-22 16:17:09 +11:00
|
|
|
'COMMUNITY': 'COMMUNITY',
|
2018-11-22 15:31:19 +11:00
|
|
|
'TESTING': 'EXPERIMENTAL',
|
2018-06-05 16:32:11 +02:00
|
|
|
}
|
2011-11-17 20:11:20 +00:00
|
|
|
|
2011-06-29 15:56:22 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_user_addon(mod, user_addon_paths):
|
2013-02-08 11:23:22 +00:00
|
|
|
import os
|
|
|
|
|
2011-06-29 15:56:22 +00:00
|
|
|
if not user_addon_paths:
|
2018-02-01 14:58:05 +11:00
|
|
|
for path in (
|
|
|
|
bpy.utils.script_path_user(),
|
|
|
|
bpy.utils.script_path_pref(),
|
|
|
|
):
|
2012-07-29 01:02:25 +00:00
|
|
|
if path is not None:
|
|
|
|
user_addon_paths.append(os.path.join(path, "addons"))
|
2011-07-01 12:33:34 +00:00
|
|
|
|
2011-06-29 15:56:22 +00:00
|
|
|
for path in user_addon_paths:
|
|
|
|
if bpy.path.is_subdir(mod.__file__, path):
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
|
2011-07-18 05:41:46 +00:00
|
|
|
@staticmethod
|
|
|
|
def draw_error(layout, message):
|
|
|
|
lines = message.split("\n")
|
|
|
|
box = layout.box()
|
2013-04-13 22:52:28 +00:00
|
|
|
sub = box.row()
|
2018-08-28 12:34:51 +10:00
|
|
|
sub.label(text=lines[0])
|
2013-04-13 22:52:28 +00:00
|
|
|
sub.label(icon='ERROR')
|
2011-07-18 05:41:46 +00:00
|
|
|
for l in lines[1:]:
|
2018-08-28 12:34:51 +10:00
|
|
|
box.label(text=l)
|
2011-07-18 05:41:46 +00:00
|
|
|
|
2010-02-14 23:33:18 +00:00
|
|
|
def draw(self, context):
|
2013-02-08 11:23:22 +00:00
|
|
|
import os
|
2012-10-01 02:04:06 +00:00
|
|
|
import addon_utils
|
|
|
|
|
2010-02-14 23:33:18 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2018-12-21 12:47:44 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
used_ext = {ext.module for ext in prefs.addons}
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2018-11-08 09:54:13 +11:00
|
|
|
addon_user_dirs = tuple(
|
|
|
|
p for p in (
|
2018-12-21 12:47:44 +11:00
|
|
|
os.path.join(prefs.filepaths.script_directory, "addons"),
|
2018-11-08 09:54:13 +11:00
|
|
|
bpy.utils.user_resource('SCRIPTS', "addons"),
|
|
|
|
)
|
|
|
|
if p
|
|
|
|
)
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2018-11-08 10:10:08 +11:00
|
|
|
# Development option for 2.8x, don't show users bundled addons
|
|
|
|
# unless they have been updated for 2.8x.
|
|
|
|
# Developers can turn them on with '--debug'
|
|
|
|
show_official_27x_addons = bpy.app.debug
|
|
|
|
|
2010-03-13 00:14:36 +00:00
|
|
|
# collect the categories that can be filtered on
|
2018-02-01 14:58:05 +11:00
|
|
|
addons = [
|
|
|
|
(mod, addon_utils.module_bl_info(mod))
|
|
|
|
for mod in addon_utils.modules(refresh=False)
|
|
|
|
]
|
2010-03-14 20:07:15 +00:00
|
|
|
|
2019-01-16 18:42:26 +01:00
|
|
|
split = layout.split(factor=0.6)
|
|
|
|
|
|
|
|
row = split.row()
|
|
|
|
row.prop(context.window_manager, "addon_support", expand=True)
|
|
|
|
|
|
|
|
row = split.row(align=True)
|
2019-03-02 00:21:05 +11:00
|
|
|
row.operator("preferences.addon_install", icon='IMPORT', text="Install...")
|
|
|
|
row.operator("preferences.addon_refresh", icon='FILE_REFRESH', text="Refresh")
|
2010-06-27 19:04:44 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
row = layout.row()
|
2019-08-15 10:21:04 +02:00
|
|
|
row.prop(context.preferences.view, "show_addons_enabled_only")
|
2019-01-04 21:40:16 +01:00
|
|
|
row.prop(context.window_manager, "addon_filter", text="")
|
|
|
|
row.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
|
2011-11-17 20:11:20 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
col = layout.column()
|
2010-02-14 23:33:18 +00:00
|
|
|
|
2013-08-28 06:36:54 +00:00
|
|
|
# set in addon_utils.modules_refresh()
|
2011-07-18 05:41:46 +00:00
|
|
|
if addon_utils.error_duplicates:
|
2017-02-27 03:54:12 +11:00
|
|
|
box = col.box()
|
|
|
|
row = box.row()
|
2018-08-28 12:34:51 +10:00
|
|
|
row.label(text="Multiple add-ons with the same name found!")
|
2017-02-27 03:54:12 +11:00
|
|
|
row.label(icon='ERROR')
|
2018-09-04 18:44:05 +10:00
|
|
|
box.label(text="Delete one of each pair to resolve:")
|
2017-02-27 03:54:12 +11:00
|
|
|
for (addon_name, addon_file, addon_path) in addon_utils.error_duplicates:
|
|
|
|
box.separator()
|
|
|
|
sub_col = box.column(align=True)
|
2018-08-28 12:34:51 +10:00
|
|
|
sub_col.label(text=addon_name + ":")
|
|
|
|
sub_col.label(text=" " + addon_file)
|
|
|
|
sub_col.label(text=" " + addon_path)
|
2017-02-27 03:54:12 +11:00
|
|
|
|
2011-08-07 04:55:58 +00:00
|
|
|
if addon_utils.error_encoding:
|
2018-02-01 14:58:05 +11:00
|
|
|
self.draw_error(
|
|
|
|
col,
|
|
|
|
"One or more addons do not have UTF-8 encoding\n"
|
|
|
|
"(see console for details)",
|
|
|
|
)
|
2011-08-07 04:55:58 +00:00
|
|
|
|
2019-08-15 10:21:04 +02:00
|
|
|
show_enabled_only = context.preferences.view.show_addons_enabled_only
|
2010-09-09 14:22:03 +00:00
|
|
|
filter = context.window_manager.addon_filter
|
|
|
|
search = context.window_manager.addon_search.lower()
|
2011-01-14 16:49:43 +00:00
|
|
|
support = context.window_manager.addon_support
|
2010-03-14 20:07:15 +00:00
|
|
|
|
2011-06-29 15:56:22 +00:00
|
|
|
# initialized on demand
|
|
|
|
user_addon_paths = []
|
|
|
|
|
2010-03-14 23:19:44 +00:00
|
|
|
for mod, info in addons:
|
2010-03-14 20:07:15 +00:00
|
|
|
module_name = mod.__name__
|
2010-03-14 23:19:44 +00:00
|
|
|
|
2010-04-21 16:50:51 +00:00
|
|
|
is_enabled = module_name in used_ext
|
|
|
|
|
2011-01-14 16:49:43 +00:00
|
|
|
if info["support"] not in support:
|
|
|
|
continue
|
|
|
|
|
2011-10-23 17:52:20 +00:00
|
|
|
# check if addon should be visible with current filters
|
2019-08-15 10:21:04 +02:00
|
|
|
is_visible = (
|
|
|
|
(filter == "All") or
|
|
|
|
(filter == info["category"]) or
|
|
|
|
(filter == "User" and (mod.__file__.startswith(addon_user_dirs)))
|
|
|
|
)
|
|
|
|
if show_enabled_only:
|
|
|
|
is_visible = is_visible and is_enabled
|
|
|
|
|
|
|
|
if is_visible:
|
2010-04-21 16:50:51 +00:00
|
|
|
if search and search not in info["name"].lower():
|
|
|
|
if info["author"]:
|
|
|
|
if search not in info["author"].lower():
|
|
|
|
continue
|
|
|
|
else:
|
2010-03-13 00:14:36 +00:00
|
|
|
continue
|
2010-04-21 16:50:51 +00:00
|
|
|
|
2018-11-08 10:10:08 +11:00
|
|
|
# Skip 2.7x add-ons included with Blender, unless in debug mode.
|
|
|
|
is_addon_27x = info.get("blender", (0,)) < (2, 80)
|
|
|
|
if (
|
|
|
|
is_addon_27x and
|
|
|
|
(not show_official_27x_addons) and
|
|
|
|
(not mod.__file__.startswith(addon_user_dirs))
|
|
|
|
):
|
|
|
|
continue
|
|
|
|
|
2010-04-21 16:50:51 +00:00
|
|
|
# Addon UI Code
|
2012-12-29 10:24:42 +00:00
|
|
|
col_box = col.column()
|
|
|
|
box = col_box.box()
|
2010-06-27 19:04:44 +00:00
|
|
|
colsub = box.column()
|
2016-01-11 20:22:14 +11:00
|
|
|
row = colsub.row(align=True)
|
2010-04-21 16:50:51 +00:00
|
|
|
|
2016-01-11 20:22:14 +11:00
|
|
|
row.operator(
|
2019-03-02 00:21:05 +11:00
|
|
|
"preferences.addon_expand",
|
2018-11-22 15:31:19 +11:00
|
|
|
icon='DISCLOSURE_TRI_DOWN' if info["show_expanded"] else 'DISCLOSURE_TRI_RIGHT',
|
2018-02-01 14:58:05 +11:00
|
|
|
emboss=False,
|
|
|
|
).module = module_name
|
2016-01-11 20:22:14 +11:00
|
|
|
|
|
|
|
row.operator(
|
2019-03-02 00:21:05 +11:00
|
|
|
"preferences.addon_disable" if is_enabled else "preferences.addon_enable",
|
2018-02-01 14:58:05 +11:00
|
|
|
icon='CHECKBOX_HLT' if is_enabled else 'CHECKBOX_DEHLT', text="",
|
|
|
|
emboss=False,
|
|
|
|
).module = module_name
|
2010-06-17 02:38:49 +00:00
|
|
|
|
2013-04-13 22:52:28 +00:00
|
|
|
sub = row.row()
|
|
|
|
sub.active = is_enabled
|
2017-09-02 15:42:29 +10:00
|
|
|
sub.label(text="%s: %s" % (info["category"], info["name"]))
|
2018-07-03 07:58:10 +02:00
|
|
|
|
|
|
|
# WARNING: 2.8x exception, may be removed
|
|
|
|
# use disabled state for old add-ons, chances are they are broken.
|
2018-11-08 10:10:08 +11:00
|
|
|
if is_addon_27x:
|
2020-02-17 13:00:01 +01:00
|
|
|
sub.label(text="Upgrade to 2.8x required")
|
2018-07-03 07:58:10 +02:00
|
|
|
sub.label(icon='ERROR')
|
|
|
|
# Remove code above after 2.8x migration is complete.
|
|
|
|
elif info["warning"]:
|
2013-04-13 22:52:28 +00:00
|
|
|
sub.label(icon='ERROR')
|
2010-06-17 02:38:49 +00:00
|
|
|
|
2011-01-14 16:49:43 +00:00
|
|
|
# icon showing support level.
|
2013-04-13 22:52:28 +00:00
|
|
|
sub.label(icon=self._support_icon_mapping.get(info["support"], 'QUESTION'))
|
2011-01-14 16:49:43 +00:00
|
|
|
|
2012-02-08 04:37:37 +00:00
|
|
|
# Expanded UI (only if additional info is available)
|
2010-08-17 17:03:52 +00:00
|
|
|
if info["show_expanded"]:
|
2010-06-17 02:38:49 +00:00
|
|
|
if info["description"]:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Description:")
|
2010-06-17 02:38:49 +00:00
|
|
|
split.label(text=info["description"])
|
|
|
|
if info["location"]:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Location:")
|
2010-06-17 02:38:49 +00:00
|
|
|
split.label(text=info["location"])
|
2012-04-11 11:22:19 +00:00
|
|
|
if mod:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2012-04-11 11:22:19 +00:00
|
|
|
split.label(text="File:")
|
2013-02-08 16:41:02 +00:00
|
|
|
split.label(text=mod.__file__, translate=False)
|
2010-04-21 16:50:51 +00:00
|
|
|
if info["author"]:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Author:")
|
2013-02-08 16:41:02 +00:00
|
|
|
split.label(text=info["author"], translate=False)
|
2010-04-21 16:50:51 +00:00
|
|
|
if info["version"]:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Version:")
|
2017-09-02 15:42:29 +10:00
|
|
|
split.label(text=".".join(str(x) for x in info["version"]), translate=False)
|
2010-06-17 02:38:49 +00:00
|
|
|
if info["warning"]:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Warning:")
|
2017-09-02 15:42:29 +10:00
|
|
|
split.label(text=" " + info["warning"], icon='ERROR')
|
2011-06-29 15:56:22 +00:00
|
|
|
|
2011-07-11 05:50:49 +00:00
|
|
|
user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths)
|
2020-03-05 11:40:05 +11:00
|
|
|
tot_row = bool(info["doc_url"]) + bool(user_addon)
|
2011-06-29 15:56:22 +00:00
|
|
|
|
|
|
|
if tot_row:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = colsub.row().split(factor=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Internet:")
|
2019-01-16 19:32:10 +01:00
|
|
|
sub = split.row()
|
2020-03-05 11:40:05 +11:00
|
|
|
if info["doc_url"]:
|
2019-01-16 19:32:10 +01:00
|
|
|
sub.operator(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.url_open", text="Documentation", icon='HELP',
|
2020-03-05 11:40:05 +11:00
|
|
|
).url = info["doc_url"]
|
2018-03-09 21:17:43 +01:00
|
|
|
# Only add "Report a Bug" button if tracker_url is set
|
|
|
|
# or the add-on is bundled (use official tracker then).
|
2019-08-20 22:00:01 +10:00
|
|
|
if info.get("tracker_url"):
|
2019-01-16 19:32:10 +01:00
|
|
|
sub.operator(
|
2018-03-09 21:17:43 +01:00
|
|
|
"wm.url_open", text="Report a Bug", icon='URL',
|
2019-08-20 22:00:01 +10:00
|
|
|
).url = info["tracker_url"]
|
|
|
|
elif not user_addon:
|
|
|
|
addon_info = ("Name: {} {}\nAuthor: {}\n").format(
|
|
|
|
info["name"], info["version"], info["author"])
|
|
|
|
props = sub.operator(
|
|
|
|
"wm.url_open_preset", text="Report a Bug", icon='URL',
|
2018-03-09 21:17:43 +01:00
|
|
|
)
|
2019-08-20 22:00:01 +10:00
|
|
|
props.type = 'BUG_ADDON'
|
|
|
|
props.id = addon_info
|
2011-06-29 15:56:22 +00:00
|
|
|
if user_addon:
|
2019-01-16 19:32:10 +01:00
|
|
|
sub.operator(
|
2019-03-02 00:21:05 +11:00
|
|
|
"preferences.addon_remove", text="Remove", icon='CANCEL',
|
2018-02-01 14:58:05 +11:00
|
|
|
).module = mod.__name__
|
2010-06-09 19:12:03 +00:00
|
|
|
|
2019-01-04 21:40:16 +01:00
|
|
|
# Show addon user preferences
|
2012-12-29 10:24:42 +00:00
|
|
|
if is_enabled:
|
2018-12-21 12:47:44 +11:00
|
|
|
addon_preferences = prefs.addons[module_name].preferences
|
2012-12-29 10:24:42 +00:00
|
|
|
if addon_preferences is not None:
|
|
|
|
draw = getattr(addon_preferences, "draw", None)
|
|
|
|
if draw is not None:
|
|
|
|
addon_preferences_class = type(addon_preferences)
|
|
|
|
box_prefs = col_box.box()
|
2018-08-28 12:34:51 +10:00
|
|
|
box_prefs.label(text="Preferences:")
|
2012-12-29 10:24:42 +00:00
|
|
|
addon_preferences_class.layout = box_prefs
|
|
|
|
try:
|
|
|
|
draw(context)
|
|
|
|
except:
|
|
|
|
import traceback
|
|
|
|
traceback.print_exc()
|
|
|
|
box_prefs.label(text="Error (see console)", icon='ERROR')
|
|
|
|
del addon_preferences_class.layout
|
|
|
|
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
# Append missing scripts
|
|
|
|
# First collect scripts that are used but have no script file.
|
|
|
|
module_names = {mod.__name__ for mod, info in addons}
|
|
|
|
missing_modules = {ext for ext in used_ext if ext not in module_names}
|
|
|
|
|
2011-03-07 13:23:45 +00:00
|
|
|
if missing_modules and filter in {"All", "Enabled"}:
|
2010-06-27 19:04:44 +00:00
|
|
|
col.column().separator()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.column().label(text="Missing script files")
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
|
|
|
module_names = {mod.__name__ for mod, info in addons}
|
2010-09-25 06:36:01 +00:00
|
|
|
for module_name in sorted(missing_modules):
|
|
|
|
is_enabled = module_name in used_ext
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
# Addon UI Code
|
2010-06-27 19:04:44 +00:00
|
|
|
box = col.column().box()
|
|
|
|
colsub = box.column()
|
2016-03-03 18:50:15 +11:00
|
|
|
row = colsub.row(align=True)
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
2016-03-03 18:50:15 +11:00
|
|
|
row.label(text="", icon='ERROR')
|
2010-09-25 06:36:01 +00:00
|
|
|
|
|
|
|
if is_enabled:
|
2018-02-01 14:58:05 +11:00
|
|
|
row.operator(
|
2019-03-02 00:21:05 +11:00
|
|
|
"preferences.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False,
|
2018-02-01 14:58:05 +11:00
|
|
|
).module = module_name
|
2010-09-25 06:36:01 +00:00
|
|
|
|
2016-03-03 18:50:15 +11:00
|
|
|
row.label(text=module_name, translate=False)
|
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Studio Light Panels
|
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class StudioLightPanel:
|
2018-12-21 12:47:44 +11:00
|
|
|
bl_space_type = 'PREFERENCES'
|
2018-06-07 16:01:57 +02:00
|
|
|
bl_region_type = 'WINDOW'
|
2019-12-19 13:21:41 +11:00
|
|
|
bl_context = "lights"
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
|
|
|
|
class StudioLightPanelMixin:
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2018-12-21 12:47:44 +11:00
|
|
|
def _get_lights(self, prefs):
|
|
|
|
return [light for light in prefs.studio_lights if light.is_user_defined and light.type == self.sl_type]
|
2018-06-08 15:34:13 +02:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-12-21 12:47:44 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
lights = self._get_lights(prefs)
|
2018-11-29 19:54:23 +01:00
|
|
|
|
|
|
|
self.draw_light_list(layout, lights)
|
|
|
|
|
|
|
|
def draw_light_list(self, layout, lights):
|
2018-06-08 15:34:13 +02:00
|
|
|
if lights:
|
2019-01-16 19:12:51 +01:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=4, even_columns=True, even_rows=True, align=False)
|
2018-06-08 15:34:13 +02:00
|
|
|
for studio_light in lights:
|
|
|
|
self.draw_studio_light(flow, studio_light)
|
|
|
|
else:
|
2018-08-28 12:34:51 +10:00
|
|
|
layout.label(text="No custom {} configured".format(self.bl_label))
|
2018-06-08 15:34:13 +02:00
|
|
|
|
2018-06-07 16:01:57 +02:00
|
|
|
def draw_studio_light(self, layout, studio_light):
|
|
|
|
box = layout.box()
|
|
|
|
row = box.row()
|
|
|
|
|
2019-01-16 19:12:51 +01:00
|
|
|
row.template_icon(layout.icon(studio_light), scale=3.0)
|
2018-11-30 15:40:46 +01:00
|
|
|
col = row.column()
|
2019-03-02 00:21:05 +11:00
|
|
|
op = col.operator("preferences.studiolight_uninstall", text="", icon='REMOVE')
|
2018-06-07 16:01:57 +02:00
|
|
|
op.index = studio_light.index
|
|
|
|
|
2018-11-30 15:40:46 +01:00
|
|
|
if studio_light.type == 'STUDIO':
|
2019-03-02 00:21:05 +11:00
|
|
|
op = col.operator("preferences.studiolight_copy_settings", text="", icon='IMPORT')
|
2018-11-30 15:40:46 +01:00
|
|
|
op.index = studio_light.index
|
|
|
|
|
2018-06-19 14:00:34 +02:00
|
|
|
box.label(text=studio_light.name)
|
|
|
|
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_studiolight_matcaps(StudioLightPanel, StudioLightPanelMixin, Panel):
|
2018-06-08 14:30:11 +02:00
|
|
|
bl_label = "MatCaps"
|
2018-11-28 22:16:56 +01:00
|
|
|
sl_type = 'MATCAP'
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_header_preset(self, _context):
|
2019-01-16 19:12:51 +01:00
|
|
|
layout = self.layout
|
2019-03-02 00:21:05 +11:00
|
|
|
layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'MATCAP'
|
2019-01-16 19:12:51 +01:00
|
|
|
layout.separator()
|
|
|
|
|
2018-06-08 14:30:11 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Panel):
|
2019-12-27 14:38:45 -06:00
|
|
|
bl_label = "HDRIs"
|
2018-11-28 22:16:56 +01:00
|
|
|
sl_type = 'WORLD'
|
2018-06-08 14:30:11 +02:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_header_preset(self, _context):
|
2019-01-16 19:12:51 +01:00
|
|
|
layout = self.layout
|
2019-03-02 00:21:05 +11:00
|
|
|
layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'WORLD'
|
2019-01-16 19:12:51 +01:00
|
|
|
layout.separator()
|
|
|
|
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Panel):
|
2018-11-28 15:57:40 +01:00
|
|
|
bl_label = "Studio Lights"
|
2018-11-28 22:16:56 +01:00
|
|
|
sl_type = 'STUDIO'
|
2018-07-17 13:58:08 +02:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_header_preset(self, _context):
|
2019-01-16 19:12:51 +01:00
|
|
|
layout = self.layout
|
2019-03-02 00:21:05 +11:00
|
|
|
op = layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...")
|
2019-01-16 19:12:51 +01:00
|
|
|
op.type = 'STUDIO'
|
|
|
|
op.filter_glob = ".sl"
|
|
|
|
layout.separator()
|
|
|
|
|
2018-11-29 21:52:24 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
class USERPREF_PT_studiolight_light_editor(StudioLightPanel, Panel):
|
2019-01-16 19:12:51 +01:00
|
|
|
bl_label = "Editor"
|
2018-11-29 21:52:24 +01:00
|
|
|
bl_parent_id = "USERPREF_PT_studiolight_lights"
|
2019-01-04 21:40:16 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-11-29 21:52:24 +01:00
|
|
|
|
2019-12-19 13:21:41 +11:00
|
|
|
@staticmethod
|
|
|
|
def opengl_light_buttons(layout, light):
|
2018-11-29 21:52:24 +01:00
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = light.use
|
|
|
|
|
|
|
|
col.prop(light, "use", text="Use Light")
|
|
|
|
col.prop(light, "diffuse_color", text="Diffuse")
|
|
|
|
col.prop(light, "specular_color", text="Specular")
|
|
|
|
col.prop(light, "smooth")
|
|
|
|
col.prop(light, "direction")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-17 13:58:08 +02:00
|
|
|
|
2018-12-21 12:47:44 +11:00
|
|
|
prefs = context.preferences
|
|
|
|
system = prefs.system
|
2018-07-17 13:58:08 +02:00
|
|
|
|
2018-11-29 21:52:24 +01:00
|
|
|
row = layout.row()
|
2019-02-11 17:49:35 +11:00
|
|
|
row.prop(system, "use_studio_light_edit", toggle=True)
|
2019-03-02 00:21:05 +11:00
|
|
|
row.operator("preferences.studiolight_new", text="Save as Studio light", icon='FILE_TICK')
|
2018-11-29 21:52:24 +01:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
column = layout.split()
|
2019-02-11 17:49:35 +11:00
|
|
|
column.active = system.use_studio_light_edit
|
2018-11-29 21:52:24 +01:00
|
|
|
|
2018-07-17 13:58:08 +02:00
|
|
|
light = system.solid_lights[0]
|
2018-08-28 12:38:54 +10:00
|
|
|
colsplit = column.split(factor=0.85)
|
2018-07-17 13:58:08 +02:00
|
|
|
self.opengl_light_buttons(colsplit, light)
|
|
|
|
|
|
|
|
light = system.solid_lights[1]
|
2018-08-28 12:38:54 +10:00
|
|
|
colsplit = column.split(factor=0.85)
|
2018-07-17 13:58:08 +02:00
|
|
|
self.opengl_light_buttons(colsplit, light)
|
|
|
|
|
|
|
|
light = system.solid_lights[2]
|
2018-11-30 13:58:27 +01:00
|
|
|
colsplit = column.split(factor=0.85)
|
|
|
|
self.opengl_light_buttons(colsplit, light)
|
|
|
|
|
|
|
|
light = system.solid_lights[3]
|
2018-07-17 13:58:08 +02:00
|
|
|
self.opengl_light_buttons(column, light)
|
|
|
|
|
2018-11-28 16:24:55 +01:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.prop(system, "light_ambient")
|
|
|
|
|
2018-11-29 19:54:23 +01:00
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Experimental Panels
|
|
|
|
|
2019-11-07 12:31:33 -03:00
|
|
|
class ExperimentalPanel:
|
|
|
|
bl_space_type = 'PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
2019-12-19 13:21:41 +11:00
|
|
|
bl_context = "experimental"
|
2019-11-07 12:31:33 -03:00
|
|
|
|
2019-12-07 08:46:02 +11:00
|
|
|
url_prefix = "https://developer.blender.org/"
|
|
|
|
|
2020-03-24 11:34:18 +11:00
|
|
|
def _draw_items(self, context, items):
|
|
|
|
prefs = context.preferences
|
|
|
|
experimental = prefs.experimental
|
|
|
|
|
|
|
|
layout = self.layout
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
layout.use_property_split = False
|
2020-03-24 11:34:18 +11:00
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
for prop_keywords, task in items:
|
|
|
|
split = layout.split(factor=0.66)
|
|
|
|
col = split.split()
|
|
|
|
col.prop(experimental, **prop_keywords)
|
|
|
|
col = split.split()
|
|
|
|
col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task
|
|
|
|
|
2019-11-07 12:31:33 -03:00
|
|
|
"""
|
2019-11-08 16:42:49 +11:00
|
|
|
# Example panel, leave it here so we always have a template to follow even
|
|
|
|
# after the features are gone from the experimental panel.
|
2019-11-07 12:31:33 -03:00
|
|
|
|
|
|
|
class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel):
|
|
|
|
bl_label = "Virtual Reality"
|
|
|
|
|
2020-01-03 14:04:11 +11:00
|
|
|
def draw(self, context):
|
2020-03-24 11:34:18 +11:00
|
|
|
self._draw_items(
|
|
|
|
context, (
|
|
|
|
({"property": "use_virtual_reality_scene_inspection"}, "T71347"),
|
|
|
|
({"property": "use_virtual_reality_immersive_drawing"}, "T71348"),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
"""
|
2019-11-08 16:42:49 +11:00
|
|
|
|
2019-11-07 12:31:33 -03:00
|
|
|
|
2020-03-17 12:29:36 +01:00
|
|
|
class USERPREF_PT_experimental_system(ExperimentalPanel, Panel):
|
|
|
|
bl_label = "System"
|
|
|
|
|
|
|
|
def draw(self, context):
|
2020-03-24 11:34:18 +11:00
|
|
|
self._draw_items(
|
|
|
|
context, (
|
2020-04-17 15:11:16 +02:00
|
|
|
({"property": "use_undo_legacy"}, "T60695"),
|
2020-03-24 11:34:18 +11:00
|
|
|
),
|
|
|
|
)
|
2020-03-17 12:29:36 +01:00
|
|
|
|
|
|
|
|
2019-12-19 13:20:37 +11:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Class Registration
|
|
|
|
|
2019-03-13 13:03:54 +11:00
|
|
|
# Order of registration defines order in UI,
|
|
|
|
# so dynamically generated classes are 'injected' in the intended order.
|
|
|
|
classes = (
|
|
|
|
USERPREF_PT_theme_user_interface,
|
|
|
|
*ThemeGenericClassGenerator.generate_panel_classes_for_wcols(),
|
2017-03-18 20:03:24 +11:00
|
|
|
USERPREF_HT_header,
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_navigation_bar,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_save_preferences,
|
2020-03-09 19:53:59 +01:00
|
|
|
USERPREF_MT_editor_menus,
|
|
|
|
USERPREF_MT_view,
|
2019-05-15 18:39:41 +10:00
|
|
|
USERPREF_MT_save_load,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
USERPREF_PT_interface_display,
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_interface_editors,
|
2019-09-18 14:32:21 +02:00
|
|
|
USERPREF_PT_interface_temporary_windows,
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_interface_translation,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_interface_text,
|
|
|
|
USERPREF_PT_interface_menus,
|
|
|
|
USERPREF_PT_interface_menus_mouse_over,
|
|
|
|
USERPREF_PT_interface_menus_pie,
|
2019-01-16 18:49:31 +01:00
|
|
|
|
|
|
|
USERPREF_PT_viewport_display,
|
|
|
|
USERPREF_PT_viewport_quality,
|
|
|
|
USERPREF_PT_viewport_textures,
|
|
|
|
USERPREF_PT_viewport_selection,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
USERPREF_PT_edit_objects,
|
2019-01-18 11:31:26 +01:00
|
|
|
USERPREF_PT_edit_objects_new,
|
|
|
|
USERPREF_PT_edit_objects_duplicate_data,
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_edit_cursor,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_edit_annotations,
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_edit_weight_paint,
|
|
|
|
USERPREF_PT_edit_gpencil,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_edit_misc,
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_animation_timeline,
|
|
|
|
USERPREF_PT_animation_keyframes,
|
|
|
|
USERPREF_PT_animation_fcurves,
|
|
|
|
|
|
|
|
USERPREF_PT_system_cycles_devices,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_system_memory,
|
2020-04-17 17:56:54 +02:00
|
|
|
USERPREF_PT_system_video_sequencer,
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_system_sound,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_MT_interface_theme_presets,
|
2017-03-18 20:03:24 +11:00
|
|
|
USERPREF_PT_theme,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_theme_interface_state,
|
|
|
|
USERPREF_PT_theme_interface_styles,
|
|
|
|
USERPREF_PT_theme_interface_gizmos,
|
2020-03-23 16:00:42 +01:00
|
|
|
USERPREF_PT_theme_interface_transparent_checker,
|
2019-01-04 21:40:16 +01:00
|
|
|
USERPREF_PT_theme_interface_icons,
|
|
|
|
USERPREF_PT_theme_text_style,
|
|
|
|
USERPREF_PT_theme_bone_color_sets,
|
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_file_paths_data,
|
|
|
|
USERPREF_PT_file_paths_render,
|
|
|
|
USERPREF_PT_file_paths_applications,
|
|
|
|
USERPREF_PT_file_paths_development,
|
|
|
|
|
|
|
|
USERPREF_PT_saveload_blend,
|
|
|
|
USERPREF_PT_saveload_blend_autosave,
|
|
|
|
USERPREF_PT_saveload_autorun,
|
|
|
|
USERPREF_PT_saveload_file_browser,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_MT_keyconfigs,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2019-01-16 18:49:31 +01:00
|
|
|
USERPREF_PT_input_keyboard,
|
|
|
|
USERPREF_PT_input_mouse,
|
|
|
|
USERPREF_PT_input_tablet,
|
|
|
|
USERPREF_PT_input_ndof,
|
|
|
|
USERPREF_PT_navigation_orbit,
|
|
|
|
USERPREF_PT_navigation_zoom,
|
|
|
|
USERPREF_PT_navigation_fly_walk,
|
|
|
|
USERPREF_PT_navigation_fly_walk_navigation,
|
|
|
|
USERPREF_PT_navigation_fly_walk_gravity,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
|
|
|
USERPREF_PT_keymap,
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_PT_addons,
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2018-11-28 16:24:55 +01:00
|
|
|
USERPREF_PT_studiolight_lights,
|
2018-11-30 14:10:20 +01:00
|
|
|
USERPREF_PT_studiolight_light_editor,
|
2018-06-08 14:30:11 +02:00
|
|
|
USERPREF_PT_studiolight_matcaps,
|
|
|
|
USERPREF_PT_studiolight_world,
|
2017-03-18 20:03:24 +11:00
|
|
|
|
2019-11-29 19:12:50 +11:00
|
|
|
# Popovers.
|
|
|
|
USERPREF_PT_ndof_settings,
|
|
|
|
|
2020-03-17 12:29:36 +01:00
|
|
|
USERPREF_PT_experimental_system,
|
|
|
|
|
2019-03-13 13:03:54 +11:00
|
|
|
# Add dynamically generated editor theme panels last,
|
|
|
|
# so they show up last in the theme section.
|
|
|
|
*ThemeGenericClassGenerator.generate_panel_classes_from_theme_areas(),
|
|
|
|
)
|
2019-01-04 21:40:16 +01:00
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|