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,
|
|
|
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
# ##### 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
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
class USERPREF_HT_header(bpy.types.Header):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.template_header(menus=False)
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'EXEC_AREA'
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("wm.save_homefile", text="Save As Default")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if userpref.active_section == 'INPUT':
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'INVOKE_DEFAULT'
|
2009-11-23 11:43:38 +00:00
|
|
|
layout.operator("wm.keyconfig_export", "Export Key Configuration...").path = "keymap.py"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
class USERPREF_MT_view(bpy.types.Menu):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "View"
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
2009-11-14 13:35:44 +00:00
|
|
|
pass # layout = self.layout
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
class USERPREF_PT_tabs(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = ""
|
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
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
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(userpref, "active_section", expand=True)
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 23:35:56 +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
|
|
|
class USERPREF_PT_interface(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_label = "Interface"
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'INTERFACE')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
view = userpref.view
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Display:")
|
|
|
|
sub1.prop(view, "tooltips")
|
|
|
|
sub1.prop(view, "display_object_info", text="Object Info")
|
|
|
|
sub1.prop(view, "use_large_cursors")
|
|
|
|
sub1.prop(view, "show_view_name", text="View Name")
|
|
|
|
sub1.prop(view, "show_playback_fps", text="Playback FPS")
|
|
|
|
sub1.prop(view, "global_scene")
|
|
|
|
sub1.prop(view, "pin_floating_panels")
|
2009-11-30 14:40:45 +00:00
|
|
|
sub1.prop(view, "object_origin_size")
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.prop(view, "show_mini_axis", text="Display Mini Axis")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub2 = sub1.column()
|
|
|
|
sub2.enabled = view.show_mini_axis
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(view, "mini_axis_size", text="Size")
|
|
|
|
sub2.prop(view, "mini_axis_brightness", text="Brightness")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="View Manipulation:")
|
|
|
|
sub1.prop(view, "auto_depth")
|
|
|
|
sub1.prop(view, "global_pivot")
|
|
|
|
sub1.prop(view, "zoom_to_mouse")
|
|
|
|
sub1.prop(view, "rotate_around_selection")
|
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(view, "auto_perspective")
|
|
|
|
sub1.prop(view, "smooth_view")
|
|
|
|
sub1.prop(view, "rotation_angle")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
sub1 = sub.column()
|
|
|
|
|
2009-10-26 11:03:12 +00:00
|
|
|
#Toolbox doesn't exist yet
|
2009-11-28 18:08:17 +00:00
|
|
|
# sub1.label(text="Toolbox:")
|
|
|
|
# sub1.prop(view, "use_column_layout")
|
|
|
|
# sub1.label(text="Open Toolbox Delay:")
|
|
|
|
# sub1.prop(view, "open_left_mouse_delay", text="Hold LMB")
|
|
|
|
# sub1.prop(view, "open_right_mouse_delay", text="Hold RMB")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
#manipulator
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(view, "use_manipulator")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub2 = sub1.column()
|
|
|
|
sub2.enabled = view.use_manipulator
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(view, "manipulator_size", text="Size")
|
|
|
|
sub2.prop(view, "manipulator_handle_size", text="Handle Size")
|
|
|
|
sub2.prop(view, "manipulator_hotspot", text="Hotspot")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Menus:")
|
|
|
|
sub1.prop(view, "open_mouse_over")
|
|
|
|
sub1.label(text="Menu Open Delay:")
|
|
|
|
sub1.prop(view, "open_toplevel_delay", text="Top Level")
|
|
|
|
sub1.prop(view, "open_sublevel_delay", text="Sub Level")
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
class USERPREF_PT_edit(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_label = "Edit"
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'EDITING')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
edit = userpref.edit
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Link Materials To:")
|
|
|
|
sub1.row().prop(edit, "material_link", expand=True)
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.label(text="New Objects:")
|
|
|
|
sub1.prop(edit, "enter_edit_mode")
|
|
|
|
sub1.label(text="Align To:")
|
|
|
|
sub1.row().prop(edit, "object_align", expand=True)
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
|
|
|
|
sub1.label(text="Undo:")
|
|
|
|
sub1.prop(edit, "global_undo")
|
|
|
|
sub1.prop(edit, "undo_steps", text="Steps")
|
|
|
|
sub1.prop(edit, "undo_memory_limit", text="Memory Limit")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Snap:")
|
|
|
|
sub1.prop(edit, "snap_translate", text="Translate")
|
|
|
|
sub1.prop(edit, "snap_rotate", text="Rotate")
|
|
|
|
sub1.prop(edit, "snap_scale", text="Scale")
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.label(text="Grease Pencil:")
|
|
|
|
sub1.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
|
|
|
|
sub1.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
|
|
|
|
# sub1.prop(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
|
|
|
|
sub1.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
|
|
|
|
sub1.prop(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Keyframing:")
|
|
|
|
sub1.prop(edit, "use_visual_keying")
|
|
|
|
sub1.prop(edit, "keyframe_insert_needed", text="Only Insert Needed")
|
|
|
|
sub1.separator()
|
|
|
|
sub1.label(text="New F-Curve Defaults:")
|
|
|
|
sub1.prop(edit, "new_interpolation_type", text="Interpolation")
|
|
|
|
sub1.separator()
|
|
|
|
sub1.prop(edit, "auto_keying_enable", text="Auto Keyframing:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub2 = sub1.column()
|
|
|
|
sub2.active = edit.auto_keying_enable
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(edit, "auto_keyframe_insert_keyingset", text="Only Insert for Keying Set")
|
|
|
|
sub2.prop(edit, "auto_keyframe_insert_available", text="Only Insert Available")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Transform:")
|
|
|
|
sub1.prop(edit, "drag_immediately")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.85)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Duplicate Data:")
|
|
|
|
sub1.prop(edit, "duplicate_mesh", text="Mesh")
|
|
|
|
sub1.prop(edit, "duplicate_surface", text="Surface")
|
|
|
|
sub1.prop(edit, "duplicate_curve", text="Curve")
|
|
|
|
sub1.prop(edit, "duplicate_text", text="Text")
|
|
|
|
sub1.prop(edit, "duplicate_metaball", text="Metaball")
|
|
|
|
sub1.prop(edit, "duplicate_armature", text="Armature")
|
|
|
|
sub1.prop(edit, "duplicate_lamp", text="Lamp")
|
|
|
|
sub1.prop(edit, "duplicate_material", text="Material")
|
|
|
|
sub1.prop(edit, "duplicate_texture", text="Texture")
|
2009-11-30 18:26:53 +00:00
|
|
|
sub1.prop(edit, "duplicate_fcurve", text="F-Curve")
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(edit, "duplicate_action", text="Action")
|
|
|
|
sub1.prop(edit, "duplicate_particle", text="Particle")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
class USERPREF_PT_system(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_label = "System"
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'SYSTEM')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
system = userpref.system
|
2009-11-28 18:08:17 +00:00
|
|
|
lamp0 = system.solid_lights[0]
|
|
|
|
lamp1 = system.solid_lights[1]
|
|
|
|
lamp2 = system.solid_lights[2]
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.9)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="General:")
|
|
|
|
sub1.prop(system, "dpi")
|
|
|
|
sub1.prop(system, "frame_server_port")
|
|
|
|
sub1.prop(system, "scrollback", text="Console Scrollback")
|
|
|
|
sub1.prop(system, "auto_run_python_scripts")
|
|
|
|
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
|
|
|
|
sub1.label(text="Sound:")
|
|
|
|
sub1.row().prop(system, "audio_device", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
sub2 = sub1.column()
|
|
|
|
sub2.active = system.audio_device != 'NONE'
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(system, "enable_all_codecs")
|
|
|
|
sub2.prop(system, "game_sound")
|
|
|
|
sub2.prop(system, "audio_channels", text="Channels")
|
|
|
|
sub2.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
|
|
|
|
sub2.prop(system, "audio_sample_rate", text="Sample Rate")
|
|
|
|
sub2.prop(system, "audio_sample_format", text="Sample Format")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.9)
|
|
|
|
|
|
|
|
sub1 = sub .column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Weight Colors:")
|
|
|
|
sub1.prop(system, "use_weight_color_range", text="Use Custom Range")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub2 = sub1.column()
|
|
|
|
sub2.active = system.use_weight_color_range
|
|
|
|
sub2.template_color_ramp(system, "weight_color_range", expand=True)
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(system, "language")
|
|
|
|
sub1.label(text="Translate:")
|
|
|
|
sub1.prop(system, "translate_tooltips", text="Tooltips")
|
|
|
|
sub1.prop(system, "translate_buttons", text="Labels")
|
|
|
|
sub1.prop(system, "translate_toolbox", text="Toolbox")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(system, "use_textured_fonts")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.9)
|
|
|
|
|
|
|
|
sub1 = sub.column()
|
|
|
|
|
2009-11-28 18:08:17 +00:00
|
|
|
sub1.label(text="Solid OpenGL lights:")
|
|
|
|
|
|
|
|
sub2 = sub1.split()
|
|
|
|
|
|
|
|
col = sub2.column()
|
|
|
|
col.prop(lamp0, "enabled")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = lamp0.enabled
|
|
|
|
sub.prop(lamp0, "diffuse_color")
|
|
|
|
sub.prop(lamp0, "specular_color")
|
|
|
|
sub.prop(lamp0, "direction")
|
|
|
|
|
|
|
|
col = sub2.column()
|
|
|
|
col.prop(lamp1, "enabled")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = lamp1.enabled
|
|
|
|
sub.prop(lamp1, "diffuse_color")
|
|
|
|
sub.prop(lamp1, "specular_color")
|
|
|
|
sub.prop(lamp1, "direction")
|
|
|
|
|
|
|
|
col = sub2.column()
|
|
|
|
col.prop(lamp2, "enabled")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = lamp2.enabled
|
|
|
|
sub.prop(lamp2, "diffuse_color")
|
|
|
|
sub.prop(lamp2, "specular_color")
|
|
|
|
sub.prop(lamp2, "direction")
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="OpenGL:")
|
|
|
|
sub1.prop(system, "clip_alpha", slider=True)
|
|
|
|
sub1.prop(system, "use_mipmaps")
|
|
|
|
sub1.prop(system, "use_vbos")
|
|
|
|
sub1.label(text="Window Draw Method:")
|
|
|
|
sub1.row().prop(system, "window_draw_method", expand=True)
|
|
|
|
sub1.label(text="Textures:")
|
|
|
|
sub1.prop(system, "gl_texture_limit", text="Limit Size")
|
|
|
|
sub1.prop(system, "texture_time_out", text="Time Out")
|
|
|
|
sub1.prop(system, "texture_collection_rate", text="Collection Rate")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
|
|
|
sub1.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.label(text="Sequencer:")
|
|
|
|
sub1.prop(system, "prefetch_frames")
|
|
|
|
sub1.prop(system, "memory_cache_limit")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
class USERPREF_PT_theme(bpy.types.Panel):
|
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_label = "Themes"
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
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
|
|
|
|
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
split = layout.split(percentage=0.33)
|
2009-11-23 00:27:30 +00:00
|
|
|
split.prop(theme, "active_theme", text="")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
split = layout.split()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
if theme.active_theme == 'VIEW_3D':
|
|
|
|
v3d = theme.view_3d
|
2009-11-03 07:23:02 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(v3d, "back")
|
|
|
|
col.prop(v3d, "button")
|
|
|
|
col.prop(v3d, "button_title")
|
|
|
|
col.prop(v3d, "button_text")
|
|
|
|
col.prop(v3d, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(v3d, "grid")
|
|
|
|
col.prop(v3d, "wire")
|
|
|
|
col.prop(v3d, "lamp", slider=True)
|
|
|
|
col.prop(v3d, "editmesh_active", slider=True)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(v3d, "object_selected")
|
|
|
|
col.prop(v3d, "object_active")
|
|
|
|
col.prop(v3d, "object_grouped")
|
|
|
|
col.prop(v3d, "object_grouped_active")
|
|
|
|
col.prop(v3d, "transform")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(v3d, "vertex")
|
|
|
|
col.prop(v3d, "face", slider=True)
|
|
|
|
col.prop(v3d, "normal")
|
|
|
|
col.prop(v3d, "bone_solid")
|
|
|
|
col.prop(v3d, "bone_pose")
|
2009-11-02 17:18:17 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
# col.prop(v3d, "edge") Doesn't seem to work
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'USER_INTERFACE':
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_regular
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Regular:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
|
|
|
layout.separator()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_tool
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Tool:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_radio
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Radio Buttons:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_text
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Text:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_option
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Option:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_toggle
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Toggle:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_num
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Number Field:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_numslider
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Value Slider:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_box
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Box:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_menu
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Menu:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_pulldown
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Pulldown:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_menu_back
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Menu Back:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_menu_item
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Menu Item:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_scroll
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Scroll Bar:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_list_item
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="List Item:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "outline")
|
|
|
|
sub1.prop(ui, "item", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner", slider=True)
|
|
|
|
sub1.prop(ui, "inner_sel", slider=True)
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "text")
|
|
|
|
sub1.prop(ui, "text_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "shaded")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub2 = sub1.column(align=True)
|
|
|
|
sub2.active = ui.shaded
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.prop(ui, "shadetop")
|
|
|
|
sub2.prop(ui, "shadedown")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface.wcol_state
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="State:")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
sub = layout.row()
|
2009-11-03 07:23:02 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner_anim")
|
|
|
|
sub1.prop(ui, "inner_anim_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner_driven")
|
|
|
|
sub1.prop(ui, "inner_driven_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "inner_key")
|
|
|
|
sub1.prop(ui, "inner_key_sel")
|
2009-11-02 17:18:17 +00:00
|
|
|
sub1 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(ui, "blend")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
ui = theme.user_interface
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
|
|
|
sub = layout.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(ui, "icon_file")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
|
|
|
layout.separator()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
|
|
|
|
elif theme.active_theme == 'GRAPH_EDITOR':
|
|
|
|
graph = theme.graph_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(graph, "back")
|
|
|
|
col.prop(graph, "button")
|
|
|
|
col.prop(graph, "button_title")
|
|
|
|
col.prop(graph, "button_text")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(graph, "header")
|
|
|
|
col.prop(graph, "grid")
|
|
|
|
col.prop(graph, "list")
|
|
|
|
col.prop(graph, "channel_group")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(graph, "active_channels_group")
|
|
|
|
col.prop(graph, "dopesheet_channel")
|
|
|
|
col.prop(graph, "dopesheet_subchannel")
|
|
|
|
col.prop(graph, "vertex")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-11 16:27:00 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(graph, "current_frame")
|
|
|
|
col.prop(graph, "handle_vertex")
|
|
|
|
col.prop(graph, "handle_vertex_select")
|
|
|
|
col.separator()
|
|
|
|
col.prop(graph, "handle_vertex_size")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'FILE_BROWSER':
|
2009-11-14 13:35:44 +00:00
|
|
|
file_browse = theme.file_browser
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(file_browse, "back")
|
|
|
|
col.prop(file_browse, "text")
|
|
|
|
col.prop(file_browse, "text_hi")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(file_browse, "header")
|
|
|
|
col.prop(file_browse, "list")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(file_browse, "selected_file")
|
|
|
|
col.prop(file_browse, "tiles")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(file_browse, "active_file")
|
|
|
|
col.prop(file_browse, "active_file_text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'NLA_EDITOR':
|
|
|
|
nla = theme.nla_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(nla, "back")
|
|
|
|
col.prop(nla, "button")
|
|
|
|
col.prop(nla, "button_title")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(nla, "button_text")
|
|
|
|
col.prop(nla, "text")
|
|
|
|
col.prop(nla, "header")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(nla, "grid")
|
|
|
|
col.prop(nla, "bars")
|
|
|
|
col.prop(nla, "bars_selected")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(nla, "strips")
|
|
|
|
col.prop(nla, "strips_selected")
|
|
|
|
col.prop(nla, "current_frame")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'DOPESHEET_EDITOR':
|
|
|
|
dope = theme.dopesheet_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(dope, "back")
|
|
|
|
col.prop(dope, "list")
|
|
|
|
col.prop(dope, "text")
|
|
|
|
col.prop(dope, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(dope, "grid")
|
|
|
|
col.prop(dope, "channels")
|
|
|
|
col.prop(dope, "channels_selected")
|
|
|
|
col.prop(dope, "channel_group")
|
2009-11-11 16:27:00 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(dope, "active_channels_group")
|
|
|
|
col.prop(dope, "long_key")
|
|
|
|
col.prop(dope, "long_key_selected")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(dope, "current_frame")
|
|
|
|
col.prop(dope, "dopesheet_channel")
|
|
|
|
col.prop(dope, "dopesheet_subchannel")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'IMAGE_EDITOR':
|
|
|
|
image = theme.image_editor
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(image, "back")
|
|
|
|
col.prop(image, "button")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(image, "button_title")
|
|
|
|
col.prop(image, "button_text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(image, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(image, "editmesh_active", slider=True)
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'SEQUENCE_EDITOR':
|
|
|
|
seq = theme.sequence_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(seq, "back")
|
|
|
|
col.prop(seq, "button")
|
|
|
|
col.prop(seq, "button_title")
|
|
|
|
col.prop(seq, "button_text")
|
|
|
|
col.prop(seq, "text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(seq, "header")
|
|
|
|
col.prop(seq, "grid")
|
|
|
|
col.prop(seq, "movie_strip")
|
|
|
|
col.prop(seq, "image_strip")
|
|
|
|
col.prop(seq, "scene_strip")
|
2009-11-11 16:27:00 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(seq, "audio_strip")
|
|
|
|
col.prop(seq, "effect_strip")
|
|
|
|
col.prop(seq, "plugin_strip")
|
|
|
|
col.prop(seq, "transition_strip")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(seq, "meta_strip")
|
|
|
|
col.prop(seq, "current_frame")
|
|
|
|
col.prop(seq, "keyframe")
|
|
|
|
col.prop(seq, "draw_action")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'PROPERTIES':
|
|
|
|
prop = theme.properties
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prop, "back")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-11 16:27:00 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prop, "title")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prop, "text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prop, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'TEXT_EDITOR':
|
|
|
|
text = theme.text_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(text, "back")
|
|
|
|
col.prop(text, "button")
|
|
|
|
col.prop(text, "button_title")
|
|
|
|
col.prop(text, "button_text")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-11 16:27:00 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(text, "text")
|
|
|
|
col.prop(text, "text_hi")
|
|
|
|
col.prop(text, "header")
|
|
|
|
col.prop(text, "line_numbers_background")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(text, "selected_text")
|
|
|
|
col.prop(text, "cursor")
|
|
|
|
col.prop(text, "syntax_builtin")
|
|
|
|
col.prop(text, "syntax_special")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(text, "syntax_comment")
|
|
|
|
col.prop(text, "syntax_string")
|
|
|
|
col.prop(text, "syntax_numbers")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'TIMELINE':
|
|
|
|
time = theme.timeline
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(time, "back")
|
|
|
|
col.prop(time, "text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(time, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(time, "grid")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-11 16:27:00 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(time, "current_frame")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'NODE_EDITOR':
|
|
|
|
node = theme.node_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(node, "back")
|
|
|
|
col.prop(node, "button")
|
|
|
|
col.prop(node, "button_title")
|
|
|
|
col.prop(node, "button_text")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(node, "text")
|
|
|
|
col.prop(node, "text_hi")
|
|
|
|
col.prop(node, "header")
|
|
|
|
col.prop(node, "wires")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(node, "wire_select")
|
|
|
|
col.prop(node, "selected_text")
|
|
|
|
col.prop(node, "node_backdrop", slider=True)
|
|
|
|
col.prop(node, "in_out_node")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(node, "converter_node")
|
|
|
|
col.prop(node, "operator_node")
|
|
|
|
col.prop(node, "group_node")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'LOGIC_EDITOR':
|
|
|
|
logic = theme.logic_editor
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(logic, "back")
|
|
|
|
col.prop(logic, "button")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(logic, "button_title")
|
|
|
|
col.prop(logic, "button_text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(logic, "text")
|
|
|
|
col.prop(logic, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(logic, "panel")
|
2009-11-02 17:18:17 +00:00
|
|
|
|
|
|
|
elif theme.active_theme == 'OUTLINER':
|
|
|
|
out = theme.outliner
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(out, "back")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(out, "text")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-11 16:27:00 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(out, "text_hi")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(out, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'INFO':
|
|
|
|
info = theme.info
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(info, "back")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(info, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(info, "header_text")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
elif theme.active_theme == 'USER_PREFERENCES':
|
|
|
|
prefs = theme.user_preferences
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prefs, "back")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prefs, "text")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prefs, "header")
|
2009-11-03 07:23:02 +00:00
|
|
|
|
2009-11-02 17:18:17 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(prefs, "header_text")
|
2009-11-02 17:18:17 +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
|
|
|
class USERPREF_PT_file(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_label = "Files"
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'FILES')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
paths = userpref.filepaths
|
|
|
|
|
|
|
|
split = layout.split(percentage=0.6)
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="File Paths:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Fonts:")
|
|
|
|
sub.prop(paths, "fonts_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Textures:")
|
|
|
|
sub.prop(paths, "textures_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Texture Plugins:")
|
|
|
|
sub.prop(paths, "texture_plugin_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Sequence Plugins:")
|
|
|
|
sub.prop(paths, "sequence_plugin_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Render Output:")
|
|
|
|
sub.prop(paths, "render_output_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Scripts:")
|
|
|
|
sub.prop(paths, "python_scripts_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Sounds:")
|
|
|
|
sub.prop(paths, "sounds_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.split(percentage=0.3)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Temp:")
|
|
|
|
sub.prop(paths, "temporary_directory", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
sub = col.split(percentage=0.2)
|
2009-11-14 13:35:44 +00:00
|
|
|
sub.column() # sub1, unused
|
2009-10-31 19:31:45 +00:00
|
|
|
sub2 = sub.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub2.label(text="Save & Load:")
|
|
|
|
sub2.prop(paths, "use_relative_paths")
|
|
|
|
sub2.prop(paths, "compress_file")
|
|
|
|
sub2.prop(paths, "load_ui")
|
|
|
|
sub2.prop(paths, "filter_file_extensions")
|
|
|
|
sub2.prop(paths, "hide_dot_files_datablocks")
|
|
|
|
sub2.separator()
|
|
|
|
sub2.separator()
|
|
|
|
sub2.label(text="Auto Save:")
|
|
|
|
sub2.prop(paths, "save_version")
|
|
|
|
sub2.prop(paths, "recent_files")
|
|
|
|
sub2.prop(paths, "save_preview_images")
|
|
|
|
sub2.prop(paths, "auto_save_temporary_files")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub3 = sub2.column()
|
|
|
|
sub3.enabled = paths.auto_save_temporary_files
|
2009-11-23 00:27:30 +00:00
|
|
|
sub3.prop(paths, "auto_save_time", text="Timer (mins)")
|
2009-08-18 12:58:51 +00:00
|
|
|
|
2009-10-31 23:35:56 +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
|
|
|
class USERPREF_PT_input(bpy.types.Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'USER_PREFERENCES'
|
|
|
|
bl_label = "Input"
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_show_header = False
|
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'INPUT')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
userpref = context.user_preferences
|
|
|
|
wm = context.manager
|
|
|
|
#input = userpref.input
|
2009-11-14 13:35:44 +00:00
|
|
|
#input = userpref
|
2009-10-31 19:31:45 +00:00
|
|
|
inputs = userpref.inputs
|
|
|
|
|
|
|
|
split = layout.split(percentage=0.25)
|
|
|
|
|
|
|
|
# General settings
|
|
|
|
row = split.row()
|
|
|
|
col = row.column()
|
|
|
|
|
|
|
|
sub = col.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Configuration:")
|
2009-11-23 11:43:38 +00:00
|
|
|
sub.prop_object(wm, "active_keyconfig", wm, "keyconfigs", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
sub = col.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Mouse:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub1 = sub.column()
|
|
|
|
sub1.enabled = (inputs.select_mouse == 'RIGHT')
|
2009-11-23 00:27:30 +00:00
|
|
|
sub1.prop(inputs, "emulate_3_button_mouse")
|
|
|
|
sub.prop(inputs, "continuous_mouse")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Select With:")
|
|
|
|
sub.row().prop(inputs, "select_mouse", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.separator()
|
2009-11-22 16:33:47 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(inputs, "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
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Orbit Style:")
|
|
|
|
sub.row().prop(inputs, "view_rotation", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="Zoom Style:")
|
|
|
|
sub.row().prop(inputs, "viewport_zoom_style", expand=True)
|
2009-11-28 04:43:15 +00:00
|
|
|
if inputs.viewport_zoom_style == 'DOLLY':
|
|
|
|
sub.row().prop(inputs, "zoom_axis", expand=True)
|
|
|
|
sub.prop(inputs, "invert_zoom_direction")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
#sub.prop(inputs, "use_middle_mouse_paste")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
#col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
#sub = col.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
#sub.label(text="Mouse Wheel:")
|
|
|
|
#sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
sub = col.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label(text="NDOF Device:")
|
|
|
|
sub.prop(inputs, "ndof_pan_speed", text="Pan Speed")
|
|
|
|
sub.prop(inputs, "ndof_rotate_speed", text="Orbit Speed")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
row.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# Keymap Settings
|
|
|
|
col = split.column()
|
|
|
|
|
2009-11-14 13:35:44 +00:00
|
|
|
# kc = wm.active_keyconfig
|
2009-10-31 19:31:45 +00:00
|
|
|
defkc = wm.default_keyconfig
|
|
|
|
km = wm.active_keymap
|
|
|
|
|
|
|
|
subsplit = col.split()
|
2009-11-23 11:43:38 +00:00
|
|
|
subsplit.prop_object(wm, "active_keymap", defkc, "keymaps", text="Map:")
|
2009-10-31 19:31:45 +00:00
|
|
|
if km.user_defined:
|
|
|
|
row = subsplit.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
row.operator("WM_OT_keymap_restore", text="Restore")
|
2009-11-23 11:43:38 +00:00
|
|
|
row.operator("WM_OT_keymap_restore", text="Restore All").all = True
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
|
|
|
row = subsplit.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
row.operator("WM_OT_keymap_edit", text="Edit")
|
|
|
|
row.label()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
for kmi in km.items:
|
|
|
|
subcol = col.column()
|
|
|
|
subcol.set_context_pointer("keyitem", kmi)
|
|
|
|
|
|
|
|
row = subcol.row()
|
|
|
|
|
|
|
|
if kmi.expanded:
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(kmi, "expanded", text="", icon='ICON_TRIA_DOWN')
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(kmi, "expanded", text="", icon='ICON_TRIA_RIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
itemrow = row.row()
|
|
|
|
itemrow.enabled = km.user_defined
|
2009-11-01 19:45:50 +00:00
|
|
|
if kmi.active:
|
2009-11-23 00:27:30 +00:00
|
|
|
itemrow.prop(kmi, "active", text="", icon='ICON_CHECKBOX_HLT')
|
2009-11-01 19:45:50 +00:00
|
|
|
else:
|
2009-11-23 00:27:30 +00:00
|
|
|
itemrow.prop(kmi, "active", text="", icon='ICON_CHECKBOX_DEHLT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
itemcol = itemrow.column()
|
|
|
|
itemcol.active = kmi.active
|
|
|
|
row = itemcol.row()
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-15 19:25:34 +00:00
|
|
|
if km.modal:
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(kmi, "propvalue", text="")
|
2009-11-15 19:25:34 +00:00
|
|
|
else:
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(kmi, "idname", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
sub = row.row()
|
|
|
|
sub.scale_x = 0.6
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "map_type", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
if kmi.map_type == 'KEYBOARD':
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "type", text="", full_event=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
elif kmi.map_type == 'MOUSE':
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "type", text="", full_event=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
elif kmi.map_type == 'TWEAK':
|
|
|
|
sub.scale_x = 0.5
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "type", text="")
|
|
|
|
sub.prop(kmi, "value", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
elif kmi.map_type == 'TIMER':
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "type", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if kmi.expanded:
|
|
|
|
if kmi.map_type not in ('TEXTINPUT', 'TIMER'):
|
|
|
|
sub = itemcol.row(align=True)
|
|
|
|
|
|
|
|
if kmi.map_type == 'KEYBOARD':
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "type", text="", event=True)
|
|
|
|
sub.prop(kmi, "value", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
elif kmi.map_type == 'MOUSE':
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(kmi, "type", text="")
|
|
|
|
sub.prop(kmi, "value", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.label()
|
|
|
|
sub.label()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
subrow = sub.row()
|
|
|
|
subrow.scale_x = 0.75
|
2009-11-23 00:27:30 +00:00
|
|
|
subrow.prop(kmi, "any")
|
|
|
|
subrow.prop(kmi, "shift")
|
|
|
|
subrow.prop(kmi, "ctrl")
|
|
|
|
subrow.prop(kmi, "alt")
|
|
|
|
subrow.prop(kmi, "oskey", text="Cmd")
|
|
|
|
sub.prop(kmi, "key_modifier", text="", event=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
flow = itemcol.column_flow(columns=2)
|
|
|
|
props = kmi.properties
|
|
|
|
|
2009-11-22 17:41:35 +00:00
|
|
|
if props is not None:
|
2009-10-31 19:31:45 +00:00
|
|
|
for pname in dir(props):
|
|
|
|
if not props.is_property_hidden(pname):
|
2009-11-23 00:27:30 +00:00
|
|
|
flow.prop(props, pname)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
itemcol.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
itemrow.operator("wm.keyitem_remove", text="", icon='ICON_ZOOMOUT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
itemrow = col.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
itemrow.label()
|
|
|
|
itemrow.operator("wm.keyitem_add", text="", icon='ICON_ZOOMIN')
|
2009-10-31 19:31:45 +00:00
|
|
|
itemrow.enabled = km.user_defined
|
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
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
bpy.types.register(USERPREF_HT_header)
|
|
|
|
bpy.types.register(USERPREF_MT_view)
|
|
|
|
bpy.types.register(USERPREF_PT_tabs)
|
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
|
|
|
bpy.types.register(USERPREF_PT_interface)
|
2009-11-02 17:18:17 +00:00
|
|
|
bpy.types.register(USERPREF_PT_theme)
|
2009-08-18 12:58:51 +00:00
|
|
|
bpy.types.register(USERPREF_PT_edit)
|
|
|
|
bpy.types.register(USERPREF_PT_system)
|
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
|
|
|
bpy.types.register(USERPREF_PT_file)
|
|
|
|
bpy.types.register(USERPREF_PT_input)
|
|
|
|
|
define operator properties in the class, similar to django fields
# Before
[
bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= ""),
bpy.props.BoolProperty(attr="use_modifiers", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True),
bpy.props.BoolProperty(attr="use_normals", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True),
bpy.props.BoolProperty(attr="use_uvs", name="Export UVs", description="Exort the active UV layer", default= True),
bpy.props.BoolProperty(attr="use_colors", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
]
# After
path = StringProperty(attr="", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
use_modifiers = BoolProperty(attr="", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True)
use_normals = BoolProperty(attr="", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True)
use_uvs = BoolProperty(attr="", name="Export UVs", description="Exort the active UV layer", default= True)
use_colors = BoolProperty(attr="", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
2009-10-31 16:40:14 +00:00
|
|
|
from bpy.props import *
|
|
|
|
|
|
|
|
|
2009-10-20 08:47:28 +00:00
|
|
|
class WM_OT_keyconfig_export(bpy.types.Operator):
|
2009-10-31 19:31:45 +00:00
|
|
|
"Export key configuration to a python script."
|
|
|
|
bl_idname = "wm.keyconfig_export"
|
|
|
|
bl_label = "Export Key Configuration..."
|
|
|
|
|
|
|
|
path = bpy.props.StringProperty(name="File Path", description="File path to write file to.")
|
|
|
|
|
|
|
|
def _string_value(self, value):
|
|
|
|
result = ""
|
|
|
|
if isinstance(value, str):
|
|
|
|
if value != "":
|
|
|
|
result = "\'%s\'" % value
|
|
|
|
elif isinstance(value, bool):
|
|
|
|
if value:
|
|
|
|
result = "True"
|
|
|
|
else:
|
|
|
|
result = "False"
|
|
|
|
elif isinstance(value, float):
|
|
|
|
result = "%.10f" % value
|
|
|
|
elif isinstance(value, int):
|
|
|
|
result = "%d" % value
|
|
|
|
elif getattr(value, '__len__', False):
|
|
|
|
if len(value):
|
|
|
|
result = "["
|
|
|
|
for i in range(0, len(value)):
|
|
|
|
result += self._string_value(value[i])
|
|
|
|
if i != len(value)-1:
|
|
|
|
result += ", "
|
|
|
|
result += "]"
|
|
|
|
else:
|
|
|
|
print("Export key configuration: can't write ", value)
|
|
|
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
def execute(self, context):
|
2009-11-19 17:12:08 +00:00
|
|
|
if not self.properties.path:
|
2009-10-31 19:31:45 +00:00
|
|
|
raise Exception("File path not set.")
|
|
|
|
|
2009-11-19 17:12:08 +00:00
|
|
|
f = open(self.properties.path, "w")
|
2009-10-31 19:31:45 +00:00
|
|
|
if not f:
|
|
|
|
raise Exception("Could not open file.")
|
|
|
|
|
|
|
|
wm = context.manager
|
|
|
|
kc = wm.active_keyconfig
|
|
|
|
|
|
|
|
f.write('# Configuration %s\n' % kc.name)
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
f.write("wm = bpy.data.windowmanagers[0]\n")
|
2009-10-31 19:31:45 +00:00
|
|
|
f.write("kc = wm.add_keyconfig(\'%s\')\n\n" % kc.name)
|
|
|
|
|
|
|
|
for km in kc.keymaps:
|
2009-11-16 20:50:02 +00:00
|
|
|
km = km.active()
|
2009-10-31 19:31:45 +00:00
|
|
|
f.write("# Map %s\n" % km.name)
|
2009-11-16 20:50:02 +00:00
|
|
|
f.write("km = kc.add_keymap(\'%s\', space_type=\'%s\', region_type=\'%s\', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.modal))
|
2009-10-31 19:31:45 +00:00
|
|
|
for kmi in km.items:
|
2009-11-16 20:50:02 +00:00
|
|
|
if km.modal:
|
|
|
|
f.write("kmi = km.add_modal_item(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value))
|
|
|
|
else:
|
|
|
|
f.write("kmi = km.add_item(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value))
|
|
|
|
if kmi.any:
|
|
|
|
f.write(", any=True")
|
|
|
|
else:
|
|
|
|
if kmi.shift:
|
|
|
|
f.write(", shift=True")
|
|
|
|
if kmi.ctrl:
|
|
|
|
f.write(", ctrl=True")
|
|
|
|
if kmi.alt:
|
|
|
|
f.write(", alt=True")
|
|
|
|
if kmi.oskey:
|
|
|
|
f.write(", oskey=True")
|
2009-10-31 19:31:45 +00:00
|
|
|
if kmi.key_modifier and kmi.key_modifier != 'NONE':
|
|
|
|
f.write(", key_modifier=\'%s\'" % kmi.key_modifier)
|
|
|
|
f.write(")\n")
|
|
|
|
|
|
|
|
props = kmi.properties
|
|
|
|
|
2009-11-22 17:41:35 +00:00
|
|
|
if props is not None:
|
2009-10-31 19:31:45 +00:00
|
|
|
for pname in dir(props):
|
|
|
|
if props.is_property_set(pname) and not props.is_property_hidden(pname):
|
|
|
|
value = eval("props.%s" % pname)
|
|
|
|
value = self._string_value(value)
|
|
|
|
if value != "":
|
|
|
|
f.write("kmi.properties.%s = %s\n" % (pname, value))
|
|
|
|
|
|
|
|
f.write("\n")
|
|
|
|
|
|
|
|
f.close()
|
|
|
|
|
|
|
|
return ('FINISHED',)
|
|
|
|
|
|
|
|
def invoke(self, context, event):
|
|
|
|
wm = context.manager
|
2009-11-02 08:32:00 +00:00
|
|
|
wm.add_fileselect(self)
|
2009-10-31 19:31:45 +00:00
|
|
|
return ('RUNNING_MODAL',)
|
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
|
|
|
|
2009-10-31 23:35:56 +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
|
|
|
class WM_OT_keymap_edit(bpy.types.Operator):
|
2009-10-31 19:31:45 +00:00
|
|
|
"Edit key map."
|
|
|
|
bl_idname = "wm.keymap_edit"
|
|
|
|
bl_label = "Edit Key Map"
|
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
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def execute(self, context):
|
|
|
|
wm = context.manager
|
|
|
|
km = wm.active_keymap
|
|
|
|
km.copy_to_user()
|
|
|
|
return ('FINISHED',)
|
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
|
|
|
|
2009-10-31 23:35:56 +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
|
|
|
class WM_OT_keymap_restore(bpy.types.Operator):
|
2009-12-04 17:54:48 +00:00
|
|
|
"Restore key map(s)."
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_idname = "wm.keymap_restore"
|
2009-12-04 17:54:48 +00:00
|
|
|
bl_label = "Restore Key Map(s)"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
all = BoolProperty(attr="all", name="All Keymaps", description="Restore all keymaps to default.")
|
|
|
|
|
|
|
|
def execute(self, context):
|
|
|
|
wm = context.manager
|
|
|
|
|
2009-11-19 17:12:08 +00:00
|
|
|
if self.properties.all:
|
2009-10-31 19:31:45 +00:00
|
|
|
for km in wm.default_keyconfig.keymaps:
|
|
|
|
km.restore_to_default()
|
|
|
|
else:
|
|
|
|
km = wm.active_keymap
|
|
|
|
km.restore_to_default()
|
|
|
|
|
|
|
|
return ('FINISHED',)
|
|
|
|
|
2009-10-31 23:35:56 +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
|
|
|
class WM_OT_keyitem_add(bpy.types.Operator):
|
2009-10-31 19:31:45 +00:00
|
|
|
"Add key map item."
|
|
|
|
bl_idname = "wm.keyitem_add"
|
|
|
|
bl_label = "Add Key Map Item"
|
|
|
|
|
|
|
|
def execute(self, context):
|
|
|
|
wm = context.manager
|
|
|
|
km = wm.active_keymap
|
2009-11-16 20:50:02 +00:00
|
|
|
if km.modal:
|
|
|
|
km.add_modal_item("", 'A', 'PRESS') # kmi
|
|
|
|
else:
|
|
|
|
km.add_item("", 'A', 'PRESS') # kmi
|
2009-10-31 19:31:45 +00:00
|
|
|
return ('FINISHED',)
|
|
|
|
|
2009-10-31 23:35:56 +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
|
|
|
class WM_OT_keyitem_remove(bpy.types.Operator):
|
2009-10-31 19:31:45 +00:00
|
|
|
"Remove key map item."
|
|
|
|
bl_idname = "wm.keyitem_remove"
|
|
|
|
bl_label = "Remove Key Map Item"
|
|
|
|
|
|
|
|
def execute(self, context):
|
|
|
|
wm = context.manager
|
|
|
|
kmi = context.keyitem
|
|
|
|
km = wm.active_keymap
|
|
|
|
km.remove_item(kmi)
|
|
|
|
return ('FINISHED',)
|
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
|
|
|
|
2009-10-20 08:47:28 +00:00
|
|
|
bpy.ops.add(WM_OT_keyconfig_export)
|
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
|
|
|
bpy.ops.add(WM_OT_keymap_edit)
|
|
|
|
bpy.ops.add(WM_OT_keymap_restore)
|
|
|
|
bpy.ops.add(WM_OT_keyitem_add)
|
2009-11-28 23:37:56 +00:00
|
|
|
bpy.ops.add(WM_OT_keyitem_remove)
|