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,
|
2018-06-07 16:01:57 +02:00
|
|
|
Operator,
|
2018-02-01 14:58:05 +11:00
|
|
|
)
|
2013-02-10 10:29:38 +00:00
|
|
|
from bpy.app.translations import pgettext_iface as iface_
|
2013-03-28 15:41:43 +00: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
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
def opengl_lamp_buttons(column, lamp):
|
2016-03-21 15:33:59 +11:00
|
|
|
split = column.row()
|
2010-01-09 15:49:27 +00:00
|
|
|
|
2010-08-18 10:42:00 +00:00
|
|
|
split.prop(lamp, "use", text="", icon='OUTLINER_OB_LAMP' if lamp.use else 'LAMP_DATA')
|
2010-01-09 15:49:27 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2010-08-18 10:42:00 +00:00
|
|
|
col.active = lamp.use
|
2010-01-09 15:49:27 +00:00
|
|
|
row = col.row()
|
2011-09-21 15:18:38 +00:00
|
|
|
row.label(text="Diffuse:")
|
2010-01-09 15:49:27 +00:00
|
|
|
row.prop(lamp, "diffuse_color", text="")
|
|
|
|
row = col.row()
|
2011-09-21 15:18:38 +00:00
|
|
|
row.label(text="Specular:")
|
2010-01-09 15:49:27 +00:00
|
|
|
row.prop(lamp, "specular_color", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
2010-08-18 10:42:00 +00:00
|
|
|
col.active = lamp.use
|
2010-01-09 15:49:27 +00:00
|
|
|
col.prop(lamp, "direction", text="")
|
2010-01-09 12:05:30 +00:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_HT_header(Header):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2018-05-31 16:44:20 +02:00
|
|
|
# No need to show type selector.
|
|
|
|
# layout.template_header()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'EXEC_AREA'
|
Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
Short list of main changes:
- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
This allows keeping UI and data without actual saves, until you actually save.
When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v).
Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards.
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
Old option is called "Save Startup File" the new one "Save User Settings".
To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
|
|
|
layout.operator("wm.save_userpref")
|
2010-04-04 14:52:15 +00:00
|
|
|
|
2010-03-30 04:27:13 +00:00
|
|
|
layout.operator_context = 'INVOKE_DEFAULT'
|
2010-04-04 14:52:15 +00:00
|
|
|
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
if userpref.active_section == 'INTERFACE':
|
|
|
|
layout.operator("wm.save_workspace_file")
|
|
|
|
elif userpref.active_section == 'INPUT':
|
2010-08-14 05:33:20 +00:00
|
|
|
layout.operator("wm.keyconfig_import")
|
2012-01-01 10:05:04 +00:00
|
|
|
layout.operator("wm.keyconfig_export")
|
2010-02-26 14:28:29 +00:00
|
|
|
elif userpref.active_section == 'ADDONS':
|
2014-03-20 01:32:44 +11:00
|
|
|
layout.operator("wm.addon_install", icon='FILESEL')
|
2013-08-30 11:49:35 +00:00
|
|
|
layout.operator("wm.addon_refresh", icon='FILE_REFRESH')
|
2016-01-08 04:58:22 +11:00
|
|
|
layout.menu("USERPREF_MT_addons_online_resources")
|
2018-06-08 14:30:11 +02:00
|
|
|
elif userpref.active_section == 'LIGHTS':
|
|
|
|
layout.operator('wm.studiolight_install', text="Install MatCap").orientation='MATCAP'
|
|
|
|
layout.operator('wm.studiolight_install', text="Install World HDRI").orientation='WORLD'
|
|
|
|
layout.operator('wm.studiolight_install', text="Install Camera HDRI").orientation='CAMERA'
|
2010-04-04 14:52:15 +00:00
|
|
|
elif userpref.active_section == 'THEMES':
|
2010-08-14 05:33:20 +00:00
|
|
|
layout.operator("ui.reset_default_theme")
|
2012-05-18 12:49:27 +00:00
|
|
|
layout.operator("wm.theme_install")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_tabs(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = ""
|
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
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
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
|
2017-06-01 16:38:32 +03:00
|
|
|
layout.row().prop(userpref, "active_section", expand=True)
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_MT_interaction_presets(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Presets"
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
preset_subdir = "interaction"
|
|
|
|
preset_operator = "script.execute_preset"
|
2011-08-12 06:57:00 +00:00
|
|
|
draw = Menu.draw_preset
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-04-01 02:41:15 +00:00
|
|
|
|
2017-03-25 09:29:51 +11:00
|
|
|
class USERPREF_MT_app_templates(Menu):
|
|
|
|
bl_label = "Application Templates"
|
|
|
|
preset_subdir = "app_templates"
|
|
|
|
|
|
|
|
def draw_ex(self, context, *, use_splash=False, use_default=False, use_install=False):
|
|
|
|
import os
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
# now draw the presets
|
|
|
|
layout.operator_context = 'EXEC_DEFAULT'
|
|
|
|
|
|
|
|
if use_default:
|
|
|
|
props = layout.operator("wm.read_homefile", text="Default")
|
|
|
|
props.use_splash = True
|
|
|
|
props.app_template = ""
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
template_paths = bpy.utils.app_template_paths()
|
|
|
|
|
|
|
|
# expand template paths
|
|
|
|
app_templates = []
|
|
|
|
for path in template_paths:
|
|
|
|
for d in os.listdir(path):
|
|
|
|
if d.startswith(("__", ".")):
|
|
|
|
continue
|
|
|
|
template = os.path.join(path, d)
|
|
|
|
if os.path.isdir(template):
|
|
|
|
# template_paths_expand.append(template)
|
|
|
|
app_templates.append(d)
|
|
|
|
|
|
|
|
for d in sorted(app_templates):
|
|
|
|
props = layout.operator(
|
|
|
|
"wm.read_homefile",
|
|
|
|
text=bpy.path.display_name(d),
|
|
|
|
)
|
|
|
|
props.use_splash = True
|
2017-06-12 13:35:00 +10:00
|
|
|
props.app_template = d
|
2017-03-25 09:29:51 +11:00
|
|
|
|
|
|
|
if use_install:
|
|
|
|
layout.separator()
|
|
|
|
layout.operator_context = 'INVOKE_DEFAULT'
|
|
|
|
props = layout.operator("wm.app_template_install")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
self.draw_ex(context, use_splash=False, use_default=True, use_install=True)
|
|
|
|
|
|
|
|
|
|
|
|
class USERPREF_MT_templates_splash(Menu):
|
|
|
|
bl_label = "Startup Templates"
|
|
|
|
preset_subdir = "templates"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
USERPREF_MT_app_templates.draw_ex(self, context, use_splash=True, use_default=True)
|
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_MT_appconfigs(Menu):
|
2011-03-27 21:45:37 +00:00
|
|
|
bl_label = "AppPresets"
|
|
|
|
preset_subdir = "keyconfig"
|
|
|
|
preset_operator = "wm.appconfig_activate"
|
|
|
|
|
|
|
|
def draw(self, context):
|
2011-09-21 15:18:38 +00:00
|
|
|
self.layout.operator("wm.appconfig_default", text="Blender (default)")
|
2011-03-27 21:45:37 +00:00
|
|
|
|
|
|
|
# now draw the presets
|
2011-08-12 06:57:00 +00:00
|
|
|
Menu.draw_preset(self, context)
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-04-01 02:41:15 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_MT_splash(Menu):
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
bl_label = "Splash"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
split = layout.split()
|
|
|
|
row = split.row()
|
2017-03-25 09:29:51 +11:00
|
|
|
|
|
|
|
if any(bpy.utils.app_template_paths()):
|
|
|
|
row.label("Template:")
|
|
|
|
template = context.user_preferences.app_template
|
|
|
|
row.menu(
|
|
|
|
"USERPREF_MT_templates_splash",
|
|
|
|
text=bpy.path.display_name(template) if template else "Default",
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
row.label("")
|
|
|
|
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
row = split.row()
|
2011-09-21 15:18:38 +00:00
|
|
|
row.label("Interaction:")
|
2015-06-09 21:54:47 +10:00
|
|
|
|
|
|
|
text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
|
|
|
|
if not text:
|
|
|
|
text = "Blender (default)"
|
|
|
|
row.menu("USERPREF_MT_appconfigs", text=text)
|
2010-04-17 19:05:53 +00:00
|
|
|
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
|
2015-02-01 04:15:34 +11:00
|
|
|
# only for addons
|
|
|
|
class USERPREF_MT_splash_footer(Menu):
|
|
|
|
bl_label = ""
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_interface(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Interface"
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'INTERFACE')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
view = userpref.view
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row = layout.row()
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
col = row.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Display:")
|
2017-03-11 03:27:08 +01:00
|
|
|
col.prop(view, "ui_scale", text="Scale")
|
2017-08-07 22:42:47 +02:00
|
|
|
col.prop(view, "ui_line_width", text="Line Width")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(view, "show_tooltips")
|
2010-11-22 05:36:49 +00:00
|
|
|
col.prop(view, "show_tooltips_python")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(view, "show_object_info", text="Object Info")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(view, "show_large_cursors")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(view, "show_view_name", text="View Name")
|
|
|
|
col.prop(view, "show_playback_fps", text="Playback FPS")
|
2009-12-08 19:08:35 +00:00
|
|
|
col.prop(view, "object_origin_size")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(view, "show_mini_axis", text="Display Mini Axis")
|
2009-12-08 19:08:35 +00:00
|
|
|
sub = col.column()
|
2010-07-23 09:33:58 +00:00
|
|
|
sub.active = view.show_mini_axis
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(view, "mini_axis_size", text="Size")
|
|
|
|
sub.prop(view, "mini_axis_brightness", text="Brightness")
|
2010-06-09 19:12:03 +00:00
|
|
|
|
2010-05-16 10:21:00 +00:00
|
|
|
col.separator()
|
2015-02-25 13:51:53 +01:00
|
|
|
|
2018-03-21 16:00:18 +01:00
|
|
|
col.label("Warnings")
|
|
|
|
col.prop(view, "use_quit_dialog")
|
2015-02-25 13:51:53 +01:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row.separator()
|
|
|
|
row.separator()
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
col = row.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="View Manipulation:")
|
2012-08-10 10:34:24 +00:00
|
|
|
col.prop(view, "use_mouse_depth_cursor")
|
2017-07-29 01:28:58 +10:00
|
|
|
col.prop(view, "use_cursor_lock_adjust")
|
2012-08-10 10:34:24 +00:00
|
|
|
col.prop(view, "use_mouse_depth_navigate")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(view, "use_zoom_to_mouse")
|
|
|
|
col.prop(view, "use_rotate_around_active")
|
2011-05-23 02:53:30 +00:00
|
|
|
col.prop(view, "use_camera_lock_parent")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(view, "use_auto_perspective")
|
2009-12-08 19:08:35 +00:00
|
|
|
col.prop(view, "smooth_view")
|
|
|
|
col.prop(view, "rotation_angle")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-30 04:43:36 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="2D Viewports:")
|
|
|
|
col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
|
2010-01-30 04:43:36 +00:00
|
|
|
col.prop(view, "timecode_style")
|
2015-05-13 20:30:53 +02:00
|
|
|
col.prop(view, "view_frame_type")
|
2018-02-01 14:58:05 +11:00
|
|
|
if view.view_frame_type == 'SECONDS':
|
2015-05-13 20:30:53 +02:00
|
|
|
col.prop(view, "view_frame_seconds")
|
2018-02-01 14:58:05 +11:00
|
|
|
elif view.view_frame_type == 'KEYFRAMES':
|
2015-05-13 20:30:53 +02:00
|
|
|
col.prop(view, "view_frame_keyframes")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row.separator()
|
|
|
|
row.separator()
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
col = row.column()
|
2018-06-05 16:32:11 +02:00
|
|
|
# Toolbox doesn't exist yet
|
|
|
|
# col.label(text="Toolbox:")
|
2010-08-17 13:14:41 +00:00
|
|
|
#col.prop(view, "show_column_layout")
|
2009-12-08 19:08:35 +00:00
|
|
|
#col.label(text="Open Toolbox Delay:")
|
|
|
|
#col.prop(view, "open_left_mouse_delay", text="Hold LMB")
|
|
|
|
#col.prop(view, "open_right_mouse_delay", text="Hold RMB")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(view, "show_manipulator")
|
2018-06-05 16:35:20 +02:00
|
|
|
# Currently not working
|
2017-06-19 17:47:04 +10:00
|
|
|
# col.prop(view, "show_manipulator_shaded")
|
2009-12-08 19:08:35 +00:00
|
|
|
sub = col.column()
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.active = view.show_manipulator
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(view, "manipulator_size", text="Size")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-06-01 22:37:27 +02:00
|
|
|
col.prop(view, "show_manipulator_navigate")
|
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Menus:")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(view, "use_mouse_over_open")
|
2013-12-02 15:23:06 +01:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = view.use_mouse_over_open
|
|
|
|
|
|
|
|
sub.prop(view, "open_toplevel_delay", text="Top Level")
|
|
|
|
sub.prop(view, "open_sublevel_delay", text="Sub Level")
|
2010-03-14 23:26:17 +00:00
|
|
|
|
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
|
|
|
col.separator()
|
|
|
|
col.label(text="Pie Menus:")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(view, "pie_animation_timeout")
|
|
|
|
sub.prop(view, "pie_initial_timeout")
|
|
|
|
sub.prop(view, "pie_menu_radius")
|
|
|
|
sub.prop(view, "pie_menu_threshold")
|
2014-10-10 19:13:40 +02:00
|
|
|
sub.prop(view, "pie_menu_confirm")
|
2013-12-02 15:23:06 +01:00
|
|
|
col.separator()
|
2018-01-12 12:30:58 +11:00
|
|
|
|
|
|
|
col.prop(view, "show_splash")
|
2010-03-14 18:08:12 +00:00
|
|
|
col.separator()
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2018-01-12 12:30:58 +11:00
|
|
|
col.label(text="App Template:")
|
|
|
|
col.label(text="Options intended for use with app-templates only.")
|
2018-01-11 16:08:55 +11:00
|
|
|
col.prop(view, "show_layout_ui")
|
2018-01-12 12:41:03 +11:00
|
|
|
col.prop(view, "show_view3d_cursor")
|
2018-01-11 16:08:55 +11:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_edit(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Edit"
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'EDITING')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
edit = userpref.edit
|
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row = layout.row()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
col = row.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Link Materials To:")
|
2010-01-09 15:49:27 +00:00
|
|
|
col.prop(edit, "material_link", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="New Objects:")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(edit, "use_enter_edit_mode")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Align To:")
|
2010-01-09 15:49:27 +00:00
|
|
|
col.prop(edit, "object_align", text="")
|
2009-12-13 13:59:16 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Undo:")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(edit, "use_global_undo")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "undo_steps", text="Steps")
|
|
|
|
col.prop(edit, "undo_memory_limit", text="Memory Limit")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row.separator()
|
|
|
|
row.separator()
|
|
|
|
|
|
|
|
col = row.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Grease Pencil:")
|
2013-11-06 10:59:05 +00:00
|
|
|
col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
|
|
|
|
col.separator()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
|
|
|
|
col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
|
2013-11-06 10:59:05 +00:00
|
|
|
col.separator()
|
2016-03-28 03:39:26 +13:00
|
|
|
col.prop(edit, "grease_pencil_default_color", text="Default Color")
|
|
|
|
col.separator()
|
2012-10-24 14:25:32 +00:00
|
|
|
col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
|
2010-02-18 00:29:08 +00:00
|
|
|
col.separator()
|
2013-11-06 10:59:05 +00:00
|
|
|
col.separator()
|
2010-02-18 00:29:08 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Playback:")
|
2010-02-18 00:29:08 +00:00
|
|
|
col.prop(edit, "use_negative_frames")
|
2012-03-22 12:19:31 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2015-08-01 17:39:48 +02:00
|
|
|
col.label(text="Node Editor:")
|
|
|
|
col.prop(edit, "node_margin")
|
2012-03-22 12:19:31 +00:00
|
|
|
col.label(text="Animation Editors:")
|
|
|
|
col.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row.separator()
|
|
|
|
row.separator()
|
|
|
|
|
|
|
|
col = row.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Keyframing:")
|
2009-12-08 19:08:35 +00:00
|
|
|
col.prop(edit, "use_visual_keying")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
|
2009-12-08 19:08:35 +00:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "use_auto_keying", text="Auto Keyframing:")
|
2012-10-09 00:59:40 +00:00
|
|
|
col.prop(edit, "use_auto_keying_warning")
|
2009-12-08 19:08:35 +00:00
|
|
|
|
|
|
|
sub = col.column()
|
|
|
|
|
2018-06-05 16:32:11 +02:00
|
|
|
# ~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
|
2009-12-08 19:08:35 +00:00
|
|
|
|
2010-02-17 15:14:09 +00:00
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="New F-Curve Defaults:")
|
|
|
|
col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation")
|
|
|
|
col.prop(edit, "keyframe_new_handle_type", text="Handles")
|
|
|
|
col.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
|
2010-02-17 15:14:09 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Transform:")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(edit, "use_drag_immediately")
|
2009-12-08 19:08:35 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
row.separator()
|
|
|
|
row.separator()
|
2009-12-08 19:08:35 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
col = row.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
|
2010-07-14 14:11:03 +00:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Duplicate Data:")
|
|
|
|
col.prop(edit, "use_duplicate_mesh", text="Mesh")
|
|
|
|
col.prop(edit, "use_duplicate_surface", text="Surface")
|
|
|
|
col.prop(edit, "use_duplicate_curve", text="Curve")
|
|
|
|
col.prop(edit, "use_duplicate_text", text="Text")
|
|
|
|
col.prop(edit, "use_duplicate_metaball", text="Metaball")
|
|
|
|
col.prop(edit, "use_duplicate_armature", text="Armature")
|
|
|
|
col.prop(edit, "use_duplicate_lamp", text="Lamp")
|
|
|
|
col.prop(edit, "use_duplicate_material", text="Material")
|
|
|
|
col.prop(edit, "use_duplicate_texture", text="Texture")
|
|
|
|
#col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
|
|
|
|
col.prop(edit, "use_duplicate_action", text="Action")
|
|
|
|
col.prop(edit, "use_duplicate_particle", text="Particle")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_system(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "System"
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'SYSTEM')
|
|
|
|
|
|
|
|
def draw(self, context):
|
2013-02-08 13:15:30 +00:00
|
|
|
import sys
|
2009-10-31 19:31:45 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
system = userpref.system
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
# 1. Column
|
2009-12-08 19:08:35 +00:00
|
|
|
column = split.column()
|
|
|
|
colsplit = column.split(percentage=0.85)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col = colsplit.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="General:")
|
2014-09-30 18:29:32 +02:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(system, "scrollback", text="Console Scrollback")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Sound:")
|
2015-07-24 15:44:17 +02:00
|
|
|
col.row().prop(system, "audio_device", expand=False)
|
2009-12-08 19:08:35 +00:00
|
|
|
sub = col.column()
|
2017-09-02 15:42:29 +10:00
|
|
|
sub.active = system.audio_device not in {'NONE', 'Null'}
|
2010-08-17 13:14:41 +00:00
|
|
|
#sub.prop(system, "use_preview_images")
|
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
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Screencast:")
|
2010-01-21 10:28:19 +00:00
|
|
|
col.prop(system, "screencast_fps")
|
2010-01-31 14:46:28 +00:00
|
|
|
col.prop(system, "screencast_wait_time")
|
2012-01-09 16:58:01 +00:00
|
|
|
|
2010-01-21 10:28:19 +00:00
|
|
|
col.separator()
|
2012-01-09 16:58:01 +00:00
|
|
|
|
2016-11-24 11:14:45 +11:00
|
|
|
if bpy.app.build_options.cycles:
|
|
|
|
addon = userpref.addons.get("cycles")
|
|
|
|
if addon is not None:
|
|
|
|
addon.preferences.draw_impl(col, context)
|
|
|
|
del addon
|
2016-11-19 01:15:08 +01:00
|
|
|
|
2015-07-20 16:08:06 +02:00
|
|
|
if hasattr(system, "opensubdiv_compute_type"):
|
|
|
|
col.label(text="OpenSubdiv compute:")
|
|
|
|
col.row().prop(system, "opensubdiv_compute_type", text="")
|
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
# 2. Column
|
2009-12-08 19:08:35 +00:00
|
|
|
column = split.column()
|
|
|
|
colsplit = column.split(percentage=0.85)
|
|
|
|
|
|
|
|
col = colsplit.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="OpenGL:")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(system, "gl_clip_alpha", slider=True)
|
2012-12-05 11:46:13 +00:00
|
|
|
col.prop(system, "use_gpu_mipmap")
|
2012-01-17 16:31:13 +00:00
|
|
|
col.prop(system, "use_16bit_textures")
|
2013-12-31 18:09:20 -06:00
|
|
|
|
2015-11-24 02:20:38 -05:00
|
|
|
col.separator()
|
|
|
|
col.label(text="Selection")
|
|
|
|
col.prop(system, "select_method", text="")
|
2017-03-09 05:17:55 +11:00
|
|
|
col.prop(system, "use_select_pick_depth")
|
2014-07-23 15:24:07 +02:00
|
|
|
|
2013-12-31 18:09:20 -06:00
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Anisotropic Filtering")
|
2011-06-24 03:30:50 +00:00
|
|
|
col.prop(system, "anisotropic_filter", text="")
|
2013-12-31 18:09:20 -06:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2012-11-11 10:55:32 +00:00
|
|
|
col.prop(system, "multi_sample", text="")
|
2013-02-08 13:15:30 +00:00
|
|
|
if sys.platform == "linux" and system.multi_sample != 'NONE':
|
|
|
|
col.label(text="Might fail for Mesh editing selection!")
|
|
|
|
col.separator()
|
Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
Short list of main changes:
- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
This allows keeping UI and data without actual saves, until you actually save.
When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v).
Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards.
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
Old option is called "Save Startup File" the new one "Save User Settings".
To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
|
|
|
col.prop(system, "use_region_overlap")
|
2014-01-27 18:38:53 +11:00
|
|
|
|
2013-12-31 18:09:20 -06:00
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Text Draw Options:")
|
2010-11-26 22:12:46 +00:00
|
|
|
col.prop(system, "use_text_antialiasing")
|
2014-01-27 18:38:53 +11:00
|
|
|
|
2013-12-31 18:09:20 -06:00
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Textures:")
|
|
|
|
col.prop(system, "gl_texture_limit", text="Limit Size")
|
|
|
|
col.prop(system, "texture_time_out", text="Time Out")
|
|
|
|
col.prop(system, "texture_collection_rate", text="Collection Rate")
|
2009-12-08 19:08:35 +00:00
|
|
|
|
|
|
|
col.separator()
|
2013-03-18 09:05:15 +00:00
|
|
|
|
2013-04-12 10:52:47 +00:00
|
|
|
col.label(text="Images Draw Method:")
|
|
|
|
col.prop(system, "image_draw_method", text="")
|
2013-03-18 09:05:15 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
|
2016-07-15 15:50:42 +10:00
|
|
|
col.label(text="Sequencer/Clip Editor:")
|
2015-09-17 03:00:32 +10:00
|
|
|
# currently disabled in the code
|
|
|
|
# col.prop(system, "prefetch_frames")
|
2009-12-08 19:08:35 +00:00
|
|
|
col.prop(system, "memory_cache_limit")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
# 3. Column
|
2009-12-15 14:22:34 +00:00
|
|
|
column = split.column()
|
|
|
|
|
2017-06-09 15:23:44 -04:00
|
|
|
column.label(text="Solid OpenGL Lights:")
|
2009-12-15 14:22:34 +00:00
|
|
|
|
|
|
|
split = column.split(percentage=0.1)
|
|
|
|
split.label()
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Colors:")
|
|
|
|
split.label(text="Direction:")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
lamp = system.solid_lights[0]
|
|
|
|
opengl_lamp_buttons(column, lamp)
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
lamp = system.solid_lights[1]
|
|
|
|
opengl_lamp_buttons(column, lamp)
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-09 15:49:27 +00:00
|
|
|
lamp = system.solid_lights[2]
|
|
|
|
opengl_lamp_buttons(column, lamp)
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-15 14:22:34 +00:00
|
|
|
column.separator()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
column.label(text="Color Picker Type:")
|
2010-01-09 15:49:27 +00:00
|
|
|
column.row().prop(system, "color_picker_type", text="")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-09 06:44:54 +00:00
|
|
|
column.separator()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
column.prop(system, "use_weight_color_range", text="Custom Weight Paint Range")
|
2010-01-09 15:49:27 +00:00
|
|
|
sub = column.column()
|
2009-12-15 14:22:34 +00:00
|
|
|
sub.active = system.use_weight_color_range
|
|
|
|
sub.template_color_ramp(system, "weight_color_range", expand=True)
|
|
|
|
|
2014-06-14 02:23:32 +10:00
|
|
|
column.separator()
|
|
|
|
column.prop(system, "font_path_ui")
|
2015-12-01 16:57:52 +11:00
|
|
|
column.prop(system, "font_path_ui_mono")
|
2014-06-14 02:23:32 +10:00
|
|
|
|
2013-01-04 04:43:49 +00:00
|
|
|
if bpy.app.build_options.international:
|
2012-12-18 18:25:48 +00:00
|
|
|
column.prop(system, "use_international_fonts")
|
|
|
|
if system.use_international_fonts:
|
|
|
|
column.prop(system, "language")
|
|
|
|
row = column.row()
|
2013-03-28 15:41:43 +00:00
|
|
|
row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager)
|
2013-08-23 20:41:21 +00:00
|
|
|
row = column.row(align=True)
|
2013-03-20 18:42:09 +00:00
|
|
|
row.prop(system, "use_translate_interface", text="Interface", toggle=True)
|
|
|
|
row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True)
|
|
|
|
row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True)
|
2011-09-15 13:20:18 +00:00
|
|
|
|
2009-12-17 01:21:55 +00:00
|
|
|
|
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 = (
|
|
|
|
("user_preferences.themes[0]", "Theme"),
|
|
|
|
("user_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
|
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_theme(Panel):
|
2009-11-02 17:18:17 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Themes"
|
2009-11-02 17:18:17 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-11-02 17:18:17 +00:00
|
|
|
|
2016-02-20 13:46:53 +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",
|
|
|
|
"paint_curve_pivot",
|
2018-02-01 14:58:05 +11:00
|
|
|
},
|
2016-02-20 13:46:53 +01:00
|
|
|
'GRAPH_EDITOR': {
|
|
|
|
"handle_vertex_select",
|
2018-02-01 14:58:05 +11:00
|
|
|
},
|
2016-02-20 13:46:53 +01:00
|
|
|
'IMAGE_EDITOR': {
|
|
|
|
"paint_curve_pivot",
|
2018-02-01 14:58:05 +11:00
|
|
|
},
|
2016-02-20 13:46:53 +01:00
|
|
|
'NODE_EDITOR': {
|
|
|
|
"layout_node",
|
2018-02-01 14:58:05 +11:00
|
|
|
},
|
2016-02-20 13:46:53 +01:00
|
|
|
'CLIP_EDITOR': {
|
|
|
|
"handle_vertex_select",
|
|
|
|
}
|
2018-02-01 14:58:05 +11:00
|
|
|
}
|
2016-02-20 13:46:53 +01:00
|
|
|
|
2010-06-26 17:24:01 +00:00
|
|
|
@staticmethod
|
2016-02-20 13:46:53 +01:00
|
|
|
def _theme_generic(split, themedata, theme_area):
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
def theme_generic_recurse(data):
|
|
|
|
col.label(data.rna_type.name)
|
|
|
|
row = col.row()
|
|
|
|
subsplit = row.split(percentage=0.95)
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
padding1 = subsplit.split(percentage=0.15)
|
|
|
|
padding1.column()
|
2010-06-26 22:23:54 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
subsplit = row.split(percentage=0.85)
|
2010-06-26 22:23:54 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
padding2 = subsplit.split(percentage=0.15)
|
|
|
|
padding2.column()
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
colsub_pair = padding1.column(), padding2.column()
|
2010-06-26 22:23:54 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
props_type = {}
|
2010-06-26 22:23:54 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
for i, prop in enumerate(data.rna_type.properties):
|
|
|
|
if prop.identifier == "rna_type":
|
|
|
|
continue
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
props_type.setdefault((prop.type, prop.subtype), []).append(prop)
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2016-02-20 13:46:53 +01:00
|
|
|
th_delimiters = USERPREF_PT_theme.ui_delimiters.get(theme_area)
|
2012-01-14 03:24:41 +00:00
|
|
|
for props_type, props_ls in sorted(props_type.items()):
|
|
|
|
if props_type[0] == 'POINTER':
|
|
|
|
for i, prop in enumerate(props_ls):
|
|
|
|
theme_generic_recurse(getattr(data, prop.identifier))
|
|
|
|
else:
|
2016-02-20 13:46:53 +01:00
|
|
|
if th_delimiters is None:
|
|
|
|
# simple, no delimiters
|
|
|
|
for i, prop in enumerate(props_ls):
|
|
|
|
colsub_pair[i % 2].row().prop(data, prop.identifier)
|
|
|
|
else:
|
|
|
|
# add hard coded delimiters
|
|
|
|
i = 0
|
|
|
|
for prop in props_ls:
|
|
|
|
colsub = colsub_pair[i]
|
|
|
|
colsub.row().prop(data, prop.identifier)
|
|
|
|
i = (i + 1) % 2
|
|
|
|
if prop.identifier in th_delimiters:
|
|
|
|
if i:
|
|
|
|
colsub = colsub_pair[1]
|
|
|
|
colsub.row().label("")
|
|
|
|
colsub_pair[0].row().label("")
|
|
|
|
colsub_pair[1].row().label("")
|
|
|
|
i = 0
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2012-01-14 03:24:41 +00:00
|
|
|
theme_generic_recurse(themedata)
|
2010-06-26 17:24:01 +00:00
|
|
|
|
2013-06-06 20:36:28 +00:00
|
|
|
@staticmethod
|
|
|
|
def _theme_widget_style(layout, widget_style):
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
|
|
|
subsplit = row.split(percentage=0.95)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub.row().prop(widget_style, "outline")
|
|
|
|
colsub.row().prop(widget_style, "item", slider=True)
|
|
|
|
colsub.row().prop(widget_style, "inner", slider=True)
|
|
|
|
colsub.row().prop(widget_style, "inner_sel", slider=True)
|
2018-04-22 13:57:42 +02:00
|
|
|
colsub.row().prop(widget_style, "roundness")
|
2013-06-06 20:36:28 +00:00
|
|
|
|
|
|
|
subsplit = row.split(percentage=0.85)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub.row().prop(widget_style, "text")
|
|
|
|
colsub.row().prop(widget_style, "text_sel")
|
|
|
|
colsub.prop(widget_style, "show_shaded")
|
|
|
|
subsub = colsub.column(align=True)
|
|
|
|
subsub.active = widget_style.show_shaded
|
|
|
|
subsub.prop(widget_style, "shadetop")
|
|
|
|
subsub.prop(widget_style, "shadedown")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def _ui_font_style(layout, font_style):
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Kerning Style:")
|
|
|
|
col.row().prop(font_style, "font_kerning_style", expand=True)
|
|
|
|
col.prop(font_style, "points")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Shadow Offset:")
|
|
|
|
col.prop(font_style, "shadow_offset_x", text="X")
|
|
|
|
col.prop(font_style, "shadow_offset_y", text="Y")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(font_style, "shadow")
|
|
|
|
col.prop(font_style, "shadow_alpha")
|
|
|
|
col.prop(font_style, "shadow_value")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-11-02 17:18:17 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'THEMES')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
theme = context.user_preferences.themes[0]
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2010-06-26 20:00:45 +00:00
|
|
|
split_themes = layout.split(percentage=0.2)
|
2012-01-10 16:30:16 +00:00
|
|
|
|
|
|
|
sub = split_themes.column()
|
|
|
|
|
|
|
|
sub.label(text="Presets:")
|
|
|
|
subrow = sub.row(align=True)
|
|
|
|
|
|
|
|
subrow.menu("USERPREF_MT_interface_theme_presets", text=USERPREF_MT_interface_theme_presets.bl_label)
|
|
|
|
subrow.operator("wm.interface_theme_preset_add", text="", icon='ZOOMIN')
|
|
|
|
subrow.operator("wm.interface_theme_preset_add", text="", icon='ZOOMOUT').remove_active = True
|
|
|
|
sub.separator()
|
|
|
|
|
|
|
|
sub.prop(theme, "theme_area", expand=True)
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2010-06-26 17:06:55 +00:00
|
|
|
split = layout.split(percentage=0.4)
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2010-06-26 17:06:55 +00:00
|
|
|
layout.separator()
|
|
|
|
layout.separator()
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2010-06-26 20:00:45 +00:00
|
|
|
split = split_themes.split()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-09 18:17:40 +00:00
|
|
|
if theme.theme_area == 'USER_INTERFACE':
|
2009-11-03 07:23:02 +00:00
|
|
|
col = split.column()
|
2013-06-06 20:36:28 +00:00
|
|
|
ui = theme.user_interface
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Regular:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_regular)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Tool:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_tool)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2018-04-26 21:17:33 +02:00
|
|
|
col.label(text="Toolbar Item:")
|
|
|
|
self._theme_widget_style(col, ui.wcol_toolbar_item)
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Radio Buttons:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_radio)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Text:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_text)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Option:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_option)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Toggle:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_toggle)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Number Field:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_num)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Value Slider:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_numslider)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Box:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_box)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Menu:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_menu)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
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
|
|
|
col.label(text="Pie Menu:")
|
|
|
|
self._theme_widget_style(col, ui.wcol_pie_menu)
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Pulldown:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_pulldown)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Menu Back:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_menu_back)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2012-03-19 22:29:16 +00:00
|
|
|
col.label(text="Tooltip:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_tooltip)
|
2012-03-19 22:29:16 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Menu Item:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_menu_item)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Scroll Bar:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_scroll)
|
2010-06-09 19:12:03 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Progress Bar:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_progress)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="List Item:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._theme_widget_style(col, ui.wcol_list_item)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
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
|
|
|
col.label(text="Tab:")
|
|
|
|
self._theme_widget_style(col, ui.wcol_tab)
|
|
|
|
|
2013-06-06 20:36:28 +00:00
|
|
|
ui_state = theme.user_interface.wcol_state
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="State:")
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2010-01-09 18:17:40 +00:00
|
|
|
row = col.row()
|
2010-06-26 17:06:55 +00:00
|
|
|
|
2010-07-05 22:22:22 +00:00
|
|
|
subsplit = row.split(percentage=0.95)
|
|
|
|
|
2010-06-26 17:06:55 +00:00
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
2013-06-06 20:36:28 +00:00
|
|
|
colsub.row().prop(ui_state, "inner_anim")
|
|
|
|
colsub.row().prop(ui_state, "inner_anim_sel")
|
|
|
|
colsub.row().prop(ui_state, "inner_driven")
|
|
|
|
colsub.row().prop(ui_state, "inner_driven_sel")
|
2017-11-29 15:47:37 +01:00
|
|
|
colsub.row().prop(ui_state, "blend")
|
2010-07-05 22:22:22 +00:00
|
|
|
|
|
|
|
subsplit = row.split(percentage=0.85)
|
|
|
|
|
2010-06-26 17:06:55 +00:00
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
2013-06-06 20:36:28 +00:00
|
|
|
colsub.row().prop(ui_state, "inner_key")
|
|
|
|
colsub.row().prop(ui_state, "inner_key_sel")
|
2017-11-29 15:47:37 +01:00
|
|
|
colsub.row().prop(ui_state, "inner_overridden")
|
|
|
|
colsub.row().prop(ui_state, "inner_overridden_sel")
|
2010-06-26 17:06:55 +00:00
|
|
|
|
2011-11-19 20:57:53 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
|
2014-10-27 18:11:55 +01:00
|
|
|
col.label("Styles:")
|
2012-12-20 16:50:39 +00:00
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
|
|
|
|
subsplit = row.split(percentage=0.95)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub.row().prop(ui, "menu_shadow_fac")
|
2014-10-27 18:11:55 +01:00
|
|
|
colsub.row().prop(ui, "icon_alpha")
|
2018-04-28 13:34:52 +02:00
|
|
|
colsub.row().prop(ui, "icon_saturation")
|
2018-04-22 22:55:05 +02:00
|
|
|
colsub.row().prop(ui, "editor_outline")
|
2011-11-19 20:57:53 +00:00
|
|
|
|
|
|
|
subsplit = row.split(percentage=0.85)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
2018-04-22 22:55:05 +02:00
|
|
|
colsub.row().prop(ui, "menu_shadow_width")
|
2014-12-08 00:38:36 +01:00
|
|
|
colsub.row().prop(ui, "widget_emboss")
|
2011-11-19 20:57:53 +00:00
|
|
|
|
2010-01-09 18:17:40 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2017-08-08 17:06:24 +10:00
|
|
|
col.label("Axis & Manipulator Colors:")
|
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
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
|
|
|
|
subsplit = row.split(percentage=0.95)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub.row().prop(ui, "axis_x")
|
|
|
|
colsub.row().prop(ui, "axis_y")
|
|
|
|
colsub.row().prop(ui, "axis_z")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
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
|
|
|
subsplit = row.split(percentage=0.85)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
2017-08-08 17:06:24 +10:00
|
|
|
colsub.row().prop(ui, "manipulator_primary")
|
|
|
|
colsub.row().prop(ui, "manipulator_secondary")
|
|
|
|
colsub.row().prop(ui, "manipulator_a")
|
|
|
|
colsub.row().prop(ui, "manipulator_b")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2017-08-08 17:06:24 +10:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
2011-03-28 11:01:24 +00:00
|
|
|
elif theme.theme_area == 'BONE_COLOR_SETS':
|
2011-02-14 03:43:28 +00:00
|
|
|
col = split.column()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2018-02-01 14:58:05 +11:00
|
|
|
for i, ui in enumerate(theme.bone_color_sets, 1):
|
2018-02-01 15:15:57 +11:00
|
|
|
col.label(text=iface_("Color Set %d:") % i, translate=False)
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2011-02-14 03:43:28 +00:00
|
|
|
row = col.row()
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2011-02-14 03:43:28 +00:00
|
|
|
subsplit = row.split(percentage=0.95)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub.row().prop(ui, "normal")
|
|
|
|
colsub.row().prop(ui, "select")
|
|
|
|
colsub.row().prop(ui, "active")
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2011-02-14 03:43:28 +00:00
|
|
|
subsplit = row.split(percentage=0.85)
|
|
|
|
|
|
|
|
padding = subsplit.split(percentage=0.15)
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub = padding.column()
|
|
|
|
colsub.row().prop(ui, "show_colored_constraints")
|
2012-12-24 00:29:24 +00:00
|
|
|
elif theme.theme_area == 'STYLE':
|
|
|
|
col = split.column()
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-12-24 00:29:24 +00:00
|
|
|
style = context.user_preferences.ui_styles[0]
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2013-01-23 16:01:35 +00:00
|
|
|
col.label(text="Panel Title:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._ui_font_style(col, style.panel_title)
|
2013-01-23 16:01:35 +00:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2012-12-24 00:29:24 +00:00
|
|
|
col.label(text="Widget:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._ui_font_style(col, style.widget)
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-12-24 00:29:24 +00:00
|
|
|
col.separator()
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-12-24 00:29:24 +00:00
|
|
|
col.label(text="Widget Label:")
|
2013-06-06 20:36:28 +00:00
|
|
|
self._ui_font_style(col, style.widget_label)
|
2010-06-26 17:24:01 +00:00
|
|
|
else:
|
2016-02-20 13:46:53 +01:00
|
|
|
self._theme_generic(split, getattr(theme, theme.theme_area.lower()), theme.theme_area)
|
2009-11-02 17:18:17 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_file(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Files"
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'FILES')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
paths = userpref.filepaths
|
2012-01-09 16:58:01 +00:00
|
|
|
system = userpref.system
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
split = layout.split(percentage=0.7)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="File Paths:")
|
2009-12-13 13:59:16 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
colsplit = col.split(percentage=0.95)
|
|
|
|
col1 = colsplit.split(percentage=0.3)
|
2009-12-13 13:59:16 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
sub = col1.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Fonts:")
|
|
|
|
sub.label(text="Textures:")
|
|
|
|
sub.label(text="Render Output:")
|
|
|
|
sub.label(text="Scripts:")
|
|
|
|
sub.label(text="Sounds:")
|
|
|
|
sub.label(text="Temp:")
|
2014-06-28 19:13:54 +02:00
|
|
|
sub.label(text="Render Cache:")
|
UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.
It also adds a few getters (to get RNA i18n context, and current language iso code).
Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).
For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
|
|
|
sub.label(text="I18n Branches:")
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Image Editor:")
|
|
|
|
sub.label(text="Animation Player:")
|
2009-12-13 13:59:16 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
sub = col1.column()
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.prop(paths, "font_directory", text="")
|
|
|
|
sub.prop(paths, "texture_directory", text="")
|
2009-12-08 19:08:35 +00:00
|
|
|
sub.prop(paths, "render_output_directory", text="")
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.prop(paths, "script_directory", text="")
|
|
|
|
sub.prop(paths, "sound_directory", text="")
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(paths, "temporary_directory", text="")
|
2014-06-28 19:13:54 +02:00
|
|
|
sub.prop(paths, "render_cache_directory", text="")
|
UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.
It also adds a few getters (to get RNA i18n context, and current language iso code).
Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).
For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
|
|
|
sub.prop(paths, "i18n_branches_directory", text="")
|
2010-03-07 09:23:57 +00:00
|
|
|
sub.prop(paths, "image_editor", text="")
|
2009-12-11 08:05:05 +00:00
|
|
|
subsplit = sub.split(percentage=0.3)
|
|
|
|
subsplit.prop(paths, "animation_player_preset", text="")
|
|
|
|
subsplit.prop(paths, "animation_player", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
col.separator()
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
colsplit = col.split(percentage=0.95)
|
|
|
|
sub = colsplit.column()
|
2013-06-18 18:11:52 +00:00
|
|
|
|
|
|
|
row = sub.split(percentage=0.3)
|
|
|
|
row.label(text="Auto Execution:")
|
|
|
|
row.prop(system, "use_scripts_auto_execute")
|
|
|
|
|
|
|
|
if system.use_scripts_auto_execute:
|
|
|
|
box = sub.box()
|
|
|
|
row = box.row()
|
|
|
|
row.label(text="Excluded Paths:")
|
|
|
|
row.operator("wm.userpref_autoexec_path_add", text="", icon='ZOOMIN', emboss=False)
|
|
|
|
for i, path_cmp in enumerate(userpref.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
|
2012-01-09 16:58:01 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Save & Load:")
|
2009-12-08 19:08:35 +00:00
|
|
|
col.prop(paths, "use_relative_paths")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(paths, "use_file_compression")
|
|
|
|
col.prop(paths, "use_load_ui")
|
|
|
|
col.prop(paths, "use_filter_files")
|
|
|
|
col.prop(paths, "show_hidden_files_datablocks")
|
2010-11-06 18:54:15 +00:00
|
|
|
col.prop(paths, "hide_recent_locations")
|
2012-10-21 14:47:16 +00:00
|
|
|
col.prop(paths, "hide_system_bookmarks")
|
2010-11-06 18:54:15 +00:00
|
|
|
col.prop(paths, "show_thumbnails")
|
2009-12-13 13:59:16 +00:00
|
|
|
|
2009-12-08 19:08:35 +00:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(paths, "save_version")
|
|
|
|
col.prop(paths, "recent_files")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(paths, "use_save_preview_images")
|
2014-01-27 18:38:53 +11:00
|
|
|
|
2013-12-31 18:09:20 -06:00
|
|
|
col.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Auto Save:")
|
Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
Short list of main changes:
- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
This allows keeping UI and data without actual saves, until you actually save.
When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v).
Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards.
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
Old option is called "Save Startup File" the new one "Save User Settings".
To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
|
|
|
col.prop(paths, "use_keep_session")
|
2010-08-17 13:14:41 +00:00
|
|
|
col.prop(paths, "use_auto_save_temporary_files")
|
2009-12-08 19:08:35 +00:00
|
|
|
sub = col.column()
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.active = paths.use_auto_save_temporary_files
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(paths, "auto_save_time", text="Timer (mins)")
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
col.separator()
|
|
|
|
|
2013-06-18 18:11:52 +00:00
|
|
|
col.label(text="Text Editor:")
|
2012-01-09 16:58:01 +00:00
|
|
|
col.prop(system, "use_tabs_as_spaces")
|
|
|
|
|
2013-12-31 18:12:51 -06:00
|
|
|
colsplit = col.split(percentage=0.95)
|
|
|
|
col1 = colsplit.split(percentage=0.3)
|
|
|
|
|
|
|
|
sub = col1.column()
|
|
|
|
sub.label(text="Author:")
|
|
|
|
sub = col1.column()
|
|
|
|
sub.prop(system, "author", text="")
|
2013-06-18 18:11:52 +00:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class USERPREF_MT_ndof_settings(Menu):
|
2012-02-08 04:37:37 +00:00
|
|
|
# accessed from the window key-bindings in C (only)
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "3D Mouse Settings"
|
2011-08-05 14:53:13 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2011-08-05 14:53:13 +00:00
|
|
|
input_prefs = context.user_preferences.inputs
|
|
|
|
|
2014-02-18 11:39:26 +11:00
|
|
|
is_view3d = context.space_data.type == 'VIEW_3D'
|
|
|
|
|
2014-02-20 10:00:16 +11:00
|
|
|
layout.prop(input_prefs, "ndof_sensitivity")
|
2014-03-11 23:40:11 +11:00
|
|
|
layout.prop(input_prefs, "ndof_orbit_sensitivity")
|
2015-07-01 13:45:19 +10:00
|
|
|
layout.prop(input_prefs, "ndof_deadzone")
|
2014-02-20 10:00:16 +11:00
|
|
|
|
2014-02-18 11:39:26 +11:00
|
|
|
if is_view3d:
|
2011-08-05 14:53:13 +00:00
|
|
|
layout.separator()
|
|
|
|
layout.prop(input_prefs, "ndof_show_guide")
|
|
|
|
|
|
|
|
layout.separator()
|
2017-09-02 15:42:29 +10:00
|
|
|
layout.label(text="Orbit Style")
|
2014-02-20 10:00:16 +11:00
|
|
|
layout.row().prop(input_prefs, "ndof_view_navigate_method", text="")
|
2012-09-28 12:37:14 +00:00
|
|
|
layout.row().prop(input_prefs, "ndof_view_rotate_method", text="")
|
2014-02-20 10:00:16 +11:00
|
|
|
layout.separator()
|
2017-09-02 15:42:29 +10:00
|
|
|
layout.label(text="Orbit Options")
|
2014-02-18 23:51:11 +11:00
|
|
|
layout.prop(input_prefs, "ndof_rotx_invert_axis")
|
|
|
|
layout.prop(input_prefs, "ndof_roty_invert_axis")
|
|
|
|
layout.prop(input_prefs, "ndof_rotz_invert_axis")
|
2011-09-07 10:33:46 +00:00
|
|
|
|
2014-02-18 11:39:26 +11:00
|
|
|
# view2d use pan/zoom
|
|
|
|
layout.separator()
|
2017-09-02 15:42:29 +10:00
|
|
|
layout.label(text="Pan Options")
|
2014-02-18 11:39:26 +11:00
|
|
|
layout.prop(input_prefs, "ndof_panx_invert_axis")
|
|
|
|
layout.prop(input_prefs, "ndof_pany_invert_axis")
|
|
|
|
layout.prop(input_prefs, "ndof_panz_invert_axis")
|
|
|
|
layout.prop(input_prefs, "ndof_pan_yz_swap_axis")
|
|
|
|
|
2017-09-02 15:42:29 +10:00
|
|
|
layout.label(text="Zoom Options")
|
2014-02-18 11:39:26 +11:00
|
|
|
layout.prop(input_prefs, "ndof_zoom_invert")
|
2011-11-14 14:02:19 +00:00
|
|
|
|
2014-02-18 11:39:26 +11:00
|
|
|
if is_view3d:
|
2011-08-05 14:53:13 +00:00
|
|
|
layout.separator()
|
2017-09-02 15:42:29 +10:00
|
|
|
layout.label(text="Fly/Walk Options")
|
2011-08-05 14:53:13 +00:00
|
|
|
layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
|
|
|
|
layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
|
|
|
|
|
|
|
|
|
2013-07-08 07:25:33 +00:00
|
|
|
class USERPREF_MT_keyconfigs(Menu):
|
|
|
|
bl_label = "KeyPresets"
|
|
|
|
preset_subdir = "keyconfig"
|
|
|
|
preset_operator = "wm.keyconfig_activate"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
props = self.layout.operator("wm.context_set_value", text="Blender (default)")
|
|
|
|
props.data_path = "window_manager.keyconfigs.active"
|
|
|
|
props.value = "context.window_manager.keyconfigs.default"
|
|
|
|
|
|
|
|
# now draw the presets
|
|
|
|
Menu.draw_preset(self, context)
|
|
|
|
|
|
|
|
|
|
|
|
class USERPREF_PT_input(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Input"
|
2013-07-08 07:25:33 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'INPUT')
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2015-06-07 17:40:39 +10:00
|
|
|
@staticmethod
|
|
|
|
def draw_input_prefs(inputs, layout):
|
2013-02-08 12:12:57 +00:00
|
|
|
import sys
|
|
|
|
|
2009-12-16 10:13:26 +00:00
|
|
|
# General settings
|
|
|
|
row = layout.row()
|
2009-10-31 19:31:45 +00:00
|
|
|
col = row.column()
|
|
|
|
|
|
|
|
sub = col.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Presets:")
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
subrow = sub.row(align=True)
|
2010-09-14 16:45:24 +00:00
|
|
|
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
|
2010-06-26 20:00:45 +00:00
|
|
|
subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMIN')
|
2010-09-14 04:58:25 +00:00
|
|
|
subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMOUT').remove_active = True
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
sub.separator()
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Mouse:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub1 = sub.column()
|
2010-07-23 09:33:58 +00:00
|
|
|
sub1.active = (inputs.select_mouse == 'RIGHT')
|
2010-08-17 13:14:41 +00:00
|
|
|
sub1.prop(inputs, "use_mouse_emulate_3_button")
|
|
|
|
sub.prop(inputs, "use_mouse_continuous")
|
2011-01-03 17:01:08 +00:00
|
|
|
sub.prop(inputs, "drag_threshold")
|
2012-02-20 15:29:02 +00:00
|
|
|
sub.prop(inputs, "tweak_threshold")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Select With:")
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.row().prop(inputs, "select_mouse", expand=True)
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2015-04-07 14:08:30 +02:00
|
|
|
sub = col.column()
|
|
|
|
sub.label(text="Double Click:")
|
|
|
|
sub.prop(inputs, "mouse_double_click_time", text="Speed")
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.separator()
|
2009-11-22 16:33:47 +00:00
|
|
|
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.prop(inputs, "use_emulate_numpad")
|
2009-11-22 16:33:47 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Orbit Style:")
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.row().prop(inputs, "view_rotate_method", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-12-31 18:53:12 -06:00
|
|
|
sub.separator()
|
2014-01-27 18:38:53 +11:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.label(text="Zoom Style:")
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.row().prop(inputs, "view_zoom_method", text="")
|
2011-04-22 14:47:35 +00:00
|
|
|
if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}:
|
2010-08-17 13:14:41 +00:00
|
|
|
sub.row().prop(inputs, "view_zoom_axis", expand=True)
|
2013-12-31 18:53:12 -06:00
|
|
|
sub.prop(inputs, "invert_mouse_zoom", text="Invert Mouse Zoom Direction")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-17 13:14:41 +00:00
|
|
|
#sub.prop(inputs, "use_mouse_mmb_paste")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-06-05 16:32:11 +02:00
|
|
|
# col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-07-20 12:37:42 +00:00
|
|
|
sub = col.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
|
2009-11-23 00:27:30 +00:00
|
|
|
#sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-02-08 12:12:57 +00:00
|
|
|
if sys.platform == "darwin":
|
|
|
|
sub = col.column()
|
2013-12-31 18:53:12 -06:00
|
|
|
sub.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction")
|
2013-02-08 12:12:57 +00:00
|
|
|
|
2013-12-03 03:14:09 -02:00
|
|
|
col.separator()
|
|
|
|
sub = col.column()
|
|
|
|
sub.label(text="View Navigation:")
|
|
|
|
sub.row().prop(inputs, "navigation_mode", expand=True)
|
|
|
|
|
2017-04-10 17:44:03 -04:00
|
|
|
sub.label(text="Walk Navigation:")
|
2013-12-03 03:14:09 -02:00
|
|
|
|
2017-04-10 17:44:03 -04:00
|
|
|
walk = inputs.walk_navigation
|
2013-12-03 03:14:09 -02:00
|
|
|
|
2017-04-10 17:44:03 -04:00
|
|
|
sub.prop(walk, "use_mouse_reverse")
|
|
|
|
sub.prop(walk, "mouse_speed")
|
|
|
|
sub.prop(walk, "teleport_time")
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(walk, "walk_speed")
|
|
|
|
sub.prop(walk, "walk_speed_factor")
|
|
|
|
|
|
|
|
sub.separator()
|
|
|
|
sub.prop(walk, "use_gravity")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.active = walk.use_gravity
|
|
|
|
sub.prop(walk, "view_height")
|
|
|
|
sub.prop(walk, "jump_height")
|
2013-12-03 03:14:09 -02:00
|
|
|
|
2016-08-18 00:21:55 -04:00
|
|
|
if inputs.use_ndof:
|
|
|
|
col.separator()
|
|
|
|
col.label(text="NDOF Device:")
|
|
|
|
sub = col.column(align=True)
|
2016-12-29 01:09:11 -05:00
|
|
|
sub.prop(inputs, "ndof_sensitivity", text="Pan Sensitivity")
|
|
|
|
sub.prop(inputs, "ndof_orbit_sensitivity", text="Orbit Sensitivity")
|
|
|
|
sub.prop(inputs, "ndof_deadzone", text="Deadzone")
|
|
|
|
|
|
|
|
sub.separator()
|
|
|
|
col.label(text="Navigation Style:")
|
2016-08-18 00:21:55 -04:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.row().prop(inputs, "ndof_view_navigate_method", expand=True)
|
2016-12-29 01:09:11 -05:00
|
|
|
|
|
|
|
sub.separator()
|
|
|
|
col.label(text="Rotation Style:")
|
|
|
|
sub = col.column(align=True)
|
2016-08-18 00:21:55 -04:00
|
|
|
sub.row().prop(inputs, "ndof_view_rotate_method", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
row.separator()
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-16 10:13:26 +00:00
|
|
|
def draw(self, context):
|
2013-07-08 22:57:51 +00:00
|
|
|
from rna_keymap_ui import draw_keymaps
|
2013-07-08 07:25:33 +00:00
|
|
|
|
2009-12-16 10:13:26 +00:00
|
|
|
layout = self.layout
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-29 02:01:02 +00:00
|
|
|
#import time
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-29 02:01:02 +00:00
|
|
|
#start = time.time()
|
2009-12-16 10:13:26 +00:00
|
|
|
|
|
|
|
userpref = context.user_preferences
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-16 10:13:26 +00:00
|
|
|
inputs = userpref.inputs
|
|
|
|
|
|
|
|
split = layout.split(percentage=0.25)
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-12-16 10:13:26 +00:00
|
|
|
# Input settings
|
|
|
|
self.draw_input_prefs(inputs, split)
|
2009-12-17 01:21:55 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
# Keymap Settings
|
2013-07-08 07:25:33 +00:00
|
|
|
draw_keymaps(context, split)
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-29 02:01:02 +00: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
|
|
|
|
2016-01-08 04:58:22 +11:00
|
|
|
class USERPREF_MT_addons_online_resources(Menu):
|
|
|
|
bl_label = "Online Resources"
|
2010-11-28 18:22:23 +00:00
|
|
|
|
2012-02-08 04:37:37 +00:00
|
|
|
# menu to open web-pages with addons development guides
|
2010-11-28 18:22:23 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2016-01-08 04:58:22 +11:00
|
|
|
layout.operator(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.url_open", text="Add-ons Catalog", icon='URL',
|
|
|
|
).url = "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts"
|
2016-01-08 04:58:22 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.url_open", text="How to share your add-on", icon='URL',
|
|
|
|
).url = "http://wiki.blender.org/index.php/Dev:Py/Sharing"
|
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Add-on Guidelines", icon='URL',
|
|
|
|
).url = "http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons"
|
2016-01-08 04:58:22 +11:00
|
|
|
layout.operator(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.url_open", text="API Concepts", icon='URL',
|
|
|
|
).url = bpy.types.WM_OT_doc_view._prefix + "/info_quickstart.html"
|
2016-01-08 04:58:22 +11:00
|
|
|
layout.operator(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.url_open", text="Add-on Tutorial", icon='URL',
|
|
|
|
).url = bpy.types.WM_OT_doc_view._prefix + "/info_tutorial_addon.html"
|
2010-11-28 18:22:23 +00:00
|
|
|
|
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-08-12 06:57:00 +00:00
|
|
|
class USERPREF_PT_addons(Panel):
|
2010-02-14 23:33:18 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
2014-11-14 12:17:25 +01:00
|
|
|
bl_label = "Add-ons"
|
2010-02-14 23:33:18 +00:00
|
|
|
bl_region_type = 'WINDOW'
|
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',
|
|
|
|
'COMMUNITY': 'POSE_DATA',
|
|
|
|
'TESTING': 'MOD_EXPLODE',
|
2018-06-05 16:32:11 +02:00
|
|
|
}
|
2011-11-17 20:11:20 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-02-14 23:33:18 +00:00
|
|
|
userpref = context.user_preferences
|
2010-02-26 14:28:29 +00:00
|
|
|
return (userpref.active_section == 'ADDONS')
|
2010-02-14 23:33:18 +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()
|
|
|
|
sub.label(lines[0])
|
|
|
|
sub.label(icon='ERROR')
|
2011-07-18 05:41:46 +00:00
|
|
|
for l in lines[1:]:
|
|
|
|
box.label(l)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
2010-02-26 14:28:29 +00:00
|
|
|
used_ext = {ext.module for ext in userpref.addons}
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2012-10-13 11:23:04 +00:00
|
|
|
userpref_addons_folder = os.path.join(userpref.filepaths.script_directory, "addons")
|
2013-01-15 23:15:32 +00:00
|
|
|
scripts_addons_folder = bpy.utils.user_resource('SCRIPTS', "addons")
|
|
|
|
|
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
|
|
|
|
2010-06-27 19:04:44 +00:00
|
|
|
split = layout.split(percentage=0.2)
|
|
|
|
col = split.column()
|
2010-09-09 14:22:03 +00:00
|
|
|
col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Supported Level")
|
2011-01-14 16:49:43 +00:00
|
|
|
col.prop(context.window_manager, "addon_support", expand=True)
|
2010-06-27 19:04:44 +00:00
|
|
|
|
2011-11-17 20:11:20 +00:00
|
|
|
col.label(text="Categories")
|
|
|
|
col.prop(context.window_manager, "addon_filter", expand=True)
|
|
|
|
|
2010-06-27 19:04:44 +00:00
|
|
|
col = split.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()
|
2017-03-19 17:31:07 +01:00
|
|
|
row.label("Multiple add-ons with the same name found!")
|
2017-02-27 03:54:12 +11:00
|
|
|
row.label(icon='ERROR')
|
|
|
|
box.label("Please delete one of each pair:")
|
|
|
|
for (addon_name, addon_file, addon_path) in addon_utils.error_duplicates:
|
|
|
|
box.separator()
|
|
|
|
sub_col = box.column(align=True)
|
|
|
|
sub_col.label(addon_name + ":")
|
|
|
|
sub_col.label(" " + addon_file)
|
|
|
|
sub_col.label(" " + addon_path)
|
|
|
|
|
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
|
|
|
|
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
|
2013-06-27 03:05:19 +00:00
|
|
|
if ((filter == "All") or
|
2018-06-05 16:32:11 +02:00
|
|
|
(filter == info["category"]) or
|
|
|
|
(filter == "Enabled" and is_enabled) or
|
|
|
|
(filter == "Disabled" and not is_enabled) or
|
|
|
|
(filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder))))
|
|
|
|
):
|
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
|
|
|
|
|
|
|
# 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(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.addon_expand",
|
|
|
|
icon='TRIA_DOWN' if info["show_expanded"] else 'TRIA_RIGHT',
|
|
|
|
emboss=False,
|
|
|
|
).module = module_name
|
2016-01-11 20:22:14 +11:00
|
|
|
|
|
|
|
row.operator(
|
2018-02-01 14:58:05 +11:00
|
|
|
"wm.addon_disable" if is_enabled else "wm.addon_enable",
|
|
|
|
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"]))
|
2010-09-07 15:17:42 +00:00
|
|
|
if 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"]:
|
2010-06-27 19:04:44 +00:00
|
|
|
split = colsub.row().split(percentage=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"]:
|
2010-06-27 19:04:44 +00:00
|
|
|
split = colsub.row().split(percentage=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:
|
|
|
|
split = colsub.row().split(percentage=0.15)
|
|
|
|
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"]:
|
2010-06-27 19:04:44 +00:00
|
|
|
split = colsub.row().split(percentage=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"]:
|
2010-06-27 19:04:44 +00:00
|
|
|
split = colsub.row().split(percentage=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"]:
|
2010-06-27 19:04:44 +00:00
|
|
|
split = colsub.row().split(percentage=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)
|
2013-11-16 03:08:51 +01:00
|
|
|
tot_row = bool(info["wiki_url"]) + bool(user_addon)
|
2011-06-29 15:56:22 +00:00
|
|
|
|
|
|
|
if tot_row:
|
2010-06-27 19:04:44 +00:00
|
|
|
split = colsub.row().split(percentage=0.15)
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Internet:")
|
2010-05-30 20:48:09 +00:00
|
|
|
if info["wiki_url"]:
|
2018-02-01 14:58:05 +11:00
|
|
|
split.operator(
|
|
|
|
"wm.url_open", text="Documentation", icon='HELP',
|
|
|
|
).url = info["wiki_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).
|
|
|
|
if info.get("tracker_url") or not user_addon:
|
|
|
|
split.operator(
|
|
|
|
"wm.url_open", text="Report a Bug", icon='URL',
|
|
|
|
).url = info.get(
|
|
|
|
"tracker_url",
|
|
|
|
"https://developer.blender.org/maniphest/task/edit/form/2",
|
|
|
|
)
|
2011-06-29 15:56:22 +00:00
|
|
|
if user_addon:
|
2018-02-01 14:58:05 +11:00
|
|
|
split.operator(
|
|
|
|
"wm.addon_remove", text="Remove", icon='CANCEL',
|
|
|
|
).module = mod.__name__
|
2010-06-09 19:12:03 +00:00
|
|
|
|
2011-06-29 15:56:22 +00:00
|
|
|
for i in range(4 - tot_row):
|
2010-05-30 20:48:09 +00:00
|
|
|
split.separator()
|
2010-02-14 23:33:18 +00:00
|
|
|
|
2012-12-29 10:24:42 +00:00
|
|
|
# Show addon user preferences
|
|
|
|
if is_enabled:
|
|
|
|
addon_preferences = userpref.addons[module_name].preferences
|
|
|
|
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()
|
|
|
|
box_prefs.label("Preferences:")
|
|
|
|
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(
|
|
|
|
"wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False,
|
|
|
|
).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)
|
|
|
|
|
|
|
|
|
2018-06-08 14:30:11 +02:00
|
|
|
class StudioLightPanelMixin():
|
2018-06-07 16:01:57 +02:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'LIGHTS')
|
|
|
|
|
2018-06-08 15:34:13 +02:00
|
|
|
def _get_lights(self, userpref):
|
|
|
|
return [light for light in userpref.studio_lights if light.is_user_defined and light.orientation == self.sl_orientation]
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
row = layout.row()
|
|
|
|
userpref = context.user_preferences
|
|
|
|
lights = self._get_lights(userpref)
|
|
|
|
row.label("({})".format(len(lights)))
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
lights = self._get_lights(userpref)
|
|
|
|
if lights:
|
|
|
|
flow = layout.column_flow(4)
|
|
|
|
for studio_light in lights:
|
|
|
|
self.draw_studio_light(flow, studio_light)
|
|
|
|
else:
|
|
|
|
layout.label("No custom {} configured".format(self.bl_label))
|
|
|
|
|
2018-06-07 16:01:57 +02:00
|
|
|
def draw_studio_light(self, layout, studio_light):
|
|
|
|
box = layout.box()
|
|
|
|
row = box.row()
|
|
|
|
|
2018-06-08 14:30:11 +02:00
|
|
|
row.template_icon_view(studio_light, "icon_id")
|
2018-06-07 16:01:57 +02:00
|
|
|
op = row.operator('wm.studiolight_uninstall', text="", icon='ZOOMOUT')
|
|
|
|
op.index = studio_light.index
|
|
|
|
|
|
|
|
|
2018-06-08 14:30:11 +02:00
|
|
|
class USERPREF_PT_studiolight_matcaps(Panel, StudioLightPanelMixin):
|
|
|
|
bl_label = "MatCaps"
|
2018-06-08 15:34:13 +02:00
|
|
|
sl_orientation = 'MATCAP'
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2018-06-08 14:30:11 +02:00
|
|
|
|
|
|
|
class USERPREF_PT_studiolight_world(Panel, StudioLightPanelMixin):
|
|
|
|
bl_label = "World HDRI"
|
2018-06-08 15:34:13 +02:00
|
|
|
sl_orientation = 'WORLD'
|
2018-06-08 14:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
class USERPREF_PT_studiolight_camera(Panel, StudioLightPanelMixin):
|
|
|
|
bl_label = "Camera HDRI"
|
2018-06-08 15:34:13 +02:00
|
|
|
sl_orientation = 'CAMERA'
|
2018-06-08 14:30:11 +02:00
|
|
|
|
2018-06-07 16:01:57 +02:00
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
classes = (
|
|
|
|
USERPREF_HT_header,
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_PT_tabs,
|
2017-03-18 20:03:24 +11:00
|
|
|
USERPREF_MT_interaction_presets,
|
2017-03-25 09:29:51 +11:00
|
|
|
USERPREF_MT_templates_splash,
|
|
|
|
USERPREF_MT_app_templates,
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_MT_appconfigs,
|
2017-03-18 20:03:24 +11:00
|
|
|
USERPREF_MT_splash,
|
|
|
|
USERPREF_MT_splash_footer,
|
|
|
|
USERPREF_PT_interface,
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_PT_edit,
|
2017-03-18 20:03:24 +11:00
|
|
|
USERPREF_PT_system,
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_MT_interface_theme_presets,
|
2017-03-18 20:03:24 +11:00
|
|
|
USERPREF_PT_theme,
|
2017-03-20 02:34:32 +11:00
|
|
|
USERPREF_PT_file,
|
|
|
|
USERPREF_MT_ndof_settings,
|
|
|
|
USERPREF_MT_keyconfigs,
|
|
|
|
USERPREF_PT_input,
|
|
|
|
USERPREF_MT_addons_online_resources,
|
|
|
|
USERPREF_PT_addons,
|
2018-06-08 14:30:11 +02:00
|
|
|
USERPREF_PT_studiolight_matcaps,
|
|
|
|
USERPREF_PT_studiolight_world,
|
|
|
|
USERPREF_PT_studiolight_camera,
|
2017-03-18 20:03:24 +11: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)
|