2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
class INFO_HT_header(bpy.types.Header):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
st = context.space_data
|
2009-07-23 21:35:11 +00:00
|
|
|
rd = context.scene.render_data
|
2009-06-30 19:20:45 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.template_header()
|
|
|
|
|
|
|
|
if context.area.show_menus:
|
|
|
|
row = layout.row()
|
|
|
|
row.itemM("INFO_MT_file")
|
|
|
|
row.itemM("INFO_MT_add")
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
if rd.use_game_engine:
|
|
|
|
row.itemM("INFO_MT_game")
|
|
|
|
else:
|
|
|
|
row.itemM("INFO_MT_render")
|
2009-06-30 19:20:45 +00:00
|
|
|
row.itemM("INFO_MT_help")
|
|
|
|
|
2009-07-17 12:26:40 +00:00
|
|
|
layout.template_ID(context.window, "screen") #, new="screen.new", open="scene.unlink")
|
|
|
|
layout.template_ID(context.screen, "scene") #, new="screen.new", unlink="scene.unlink")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
if rd.multiple_engines:
|
|
|
|
layout.itemR(rd, "engine", text="")
|
|
|
|
|
2009-06-30 19:20:45 +00:00
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.template_operator_search()
|
|
|
|
layout.template_running_jobs()
|
|
|
|
|
|
|
|
class INFO_MT_file(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "File"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator_context = "EXEC_AREA"
|
2009-07-23 21:35:11 +00:00
|
|
|
layout.itemO("wm.read_homefile", text="New")
|
2009-06-30 19:20:45 +00:00
|
|
|
layout.operator_context = "INVOKE_AREA"
|
2009-07-23 21:35:11 +00:00
|
|
|
layout.itemO("wm.open_mainfile", text="Open...")
|
|
|
|
layout.item_menu_enumO("wm.open_recentfile", "file", text="Open Recent")
|
|
|
|
layout.itemO("wm.recover_last_session")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.operator_context = "EXEC_AREA"
|
2009-07-23 21:35:11 +00:00
|
|
|
layout.itemO("wm.save_mainfile", text="Save")
|
2009-06-30 19:20:45 +00:00
|
|
|
layout.operator_context = "INVOKE_AREA"
|
2009-07-23 21:35:11 +00:00
|
|
|
layout.itemO("wm.save_as_mainfile", text="Save As...")
|
2009-07-24 12:45:25 +00:00
|
|
|
layout.itemO("screen.userpref_show", text="User Preferences...")
|
2009-07-23 21:35:11 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.itemM("INFO_MT_file_import")
|
|
|
|
layout.itemM("INFO_MT_file_export")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.itemM("INFO_MT_file_external_data")
|
|
|
|
|
2009-07-23 21:35:11 +00:00
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.operator_context = "EXEC_AREA"
|
|
|
|
layout.itemO("wm.exit_blender", text="Quit")
|
|
|
|
|
|
|
|
class INFO_MT_file_import(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Import"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
class INFO_MT_file_export(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Export"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.itemO("export.ply", text="PLY")
|
|
|
|
|
2009-06-30 19:20:45 +00:00
|
|
|
class INFO_MT_file_external_data(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "External Data"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2009-07-17 12:26:40 +00:00
|
|
|
layout.itemO("file.pack_all", text="Pack into .blend file")
|
|
|
|
layout.itemO("file.unpack_all", text="Unpack into Files...")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
2009-07-17 12:26:40 +00:00
|
|
|
layout.itemO("file.make_paths_relative")
|
|
|
|
layout.itemO("file.make_paths_absolute")
|
|
|
|
layout.itemO("file.report_missing_files")
|
|
|
|
layout.itemO("file.find_missing_files")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
class INFO_MT_add(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Add"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2009-07-23 21:35:11 +00:00
|
|
|
layout.operator_context = "EXEC_SCREEN"
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-08-06 13:15:23 +00:00
|
|
|
layout.item_menu_enumO( "OBJECT_OT_mesh_add", "type", text="Mesh", icon='ICON_OUTLINER_OB_MESH')
|
|
|
|
layout.item_menu_enumO( "OBJECT_OT_curve_add", "type", text="Curve", icon='ICON_OUTLINER_OB_CURVE')
|
|
|
|
layout.item_menu_enumO( "OBJECT_OT_surface_add", "type", text="Surface", icon='ICON_OUTLINER_OB_SURFACE')
|
|
|
|
layout.item_menu_enumO( "OBJECT_OT_metaball_add", "type", 'META', icon='ICON_OUTLINER_OB_META')
|
|
|
|
layout.itemO("OBJECT_OT_text_add", text="Text", icon='ICON_OUTLINER_OB_FONT')
|
2009-07-23 21:35:11 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
2009-08-06 13:15:23 +00:00
|
|
|
layout.itemO("OBJECT_OT_armature_add", text="Armature", icon='ICON_OUTLINER_OB_ARMATURE')
|
|
|
|
layout.item_enumO("OBJECT_OT_object_add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE')
|
|
|
|
layout.item_enumO("OBJECT_OT_object_add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY')
|
2009-07-23 21:35:11 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
2009-08-06 13:15:23 +00:00
|
|
|
layout.item_enumO("OBJECT_OT_object_add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA')
|
|
|
|
layout.item_enumO("OBJECT_OT_object_add", "type", 'LAMP', icon='ICON_OUTLINER_OB_LAMP')
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
class INFO_MT_game(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Game"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-23 21:35:11 +00:00
|
|
|
|
|
|
|
layout.itemO("view3d.game_start")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
class INFO_MT_render(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Render"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-23 21:35:11 +00:00
|
|
|
rd = context.scene.render_data
|
|
|
|
|
|
|
|
layout.itemO("screen.render", text="Render Image")
|
|
|
|
layout.item_booleanO("screen.render", "animation", True, text="Render Animation")
|
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.itemO("screen.render_view_show")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
|
|
|
class INFO_MT_help(bpy.types.Menu):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Help"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-23 21:35:11 +00:00
|
|
|
|
|
|
|
layout.itemO("help.manual")
|
|
|
|
layout.itemO("help.release_logs")
|
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
|
|
|
|
layout.itemO("help.blender_website")
|
|
|
|
layout.itemO("help.blender_eshop")
|
|
|
|
layout.itemO("help.developer_community")
|
|
|
|
layout.itemO("help.user_community")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-07-15 19:19:43 +00:00
|
|
|
class INFO_PT_tabs(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-15 19:19:43 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
|
2009-07-16 10:32:21 +00:00
|
|
|
layout.itemR(userpref, "active_section", expand=True)
|
2009-07-15 19:19:43 +00:00
|
|
|
|
|
|
|
class INFO_PT_view(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "View"
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-15 19:19:43 +00:00
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'VIEW_CONTROLS')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
view = userpref.view
|
|
|
|
|
2009-07-16 10:32:21 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
colsplitcol.itemL(text="Display:")
|
|
|
|
colsplitcol.itemR(view, "tooltips")
|
|
|
|
colsplitcol.itemR(view, "display_object_info", text="Object Info")
|
|
|
|
colsplitcol.itemR(view, "use_large_cursors")
|
|
|
|
colsplitcol.itemR(view, "show_view_name", text="View Name")
|
|
|
|
colsplitcol.itemR(view, "show_playback_fps", text="Playback FPS")
|
|
|
|
colsplitcol.itemR(view, "global_scene")
|
|
|
|
colsplitcol.itemR(view, "pin_floating_panels")
|
|
|
|
colsplitcol.itemR(view, "object_center_size")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemR(view, "show_mini_axis")
|
|
|
|
colsub = colsplitcol.column()
|
|
|
|
colsub.enabled = view.show_mini_axis
|
|
|
|
colsub.itemR(view, "mini_axis_size")
|
|
|
|
colsub.itemR(view, "mini_axis_brightness")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-07-17 12:35:57 +00:00
|
|
|
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
|
2009-07-17 12:35:57 +00:00
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
colsplitcol.itemL(text="View Manipulation:")
|
|
|
|
colsplitcol.itemR(view, "auto_depth")
|
|
|
|
colsplitcol.itemR(view, "global_pivot")
|
|
|
|
colsplitcol.itemR(view, "zoom_to_mouse")
|
2009-07-18 04:09:23 +00:00
|
|
|
colsplitcol.itemR(view, "rotate_around_selection")
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Zoom Style:")
|
|
|
|
row = colsplitcol.row()
|
2009-07-16 10:32:21 +00:00
|
|
|
row.itemR(view, "viewport_zoom_style", expand=True)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Orbit Style:")
|
|
|
|
row = colsplitcol.row()
|
2009-07-16 10:32:21 +00:00
|
|
|
row.itemR(view, "view_rotation", expand=True)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemR(view, "perspective_orthographic_switch")
|
|
|
|
colsplitcol.itemR(view, "smooth_view")
|
|
|
|
colsplitcol.itemR(view, "rotation_angle")
|
|
|
|
colsplitcol.itemL(text="NDOF Device:")
|
|
|
|
colsplitcol.itemR(view, "ndof_pan_speed", text="Pan Speed")
|
|
|
|
colsplitcol.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
colsplitcol.itemL(text="Mouse Buttons:")
|
|
|
|
colsplitcol.itemR(view, "left_mouse_button_select")
|
|
|
|
colsplitcol.itemR(view, "right_mouse_button_select")
|
|
|
|
colsplitcol.itemR(view, "emulate_3_button_mouse")
|
|
|
|
colsplitcol.itemR(view, "use_middle_mouse_paste")
|
|
|
|
colsplitcol.itemR(view, "middle_mouse_rotate")
|
|
|
|
colsplitcol.itemR(view, "middle_mouse_pan")
|
|
|
|
colsplitcol.itemR(view, "wheel_invert_zoom")
|
|
|
|
colsplitcol.itemR(view, "wheel_scroll_lines")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Menus:")
|
|
|
|
colsplitcol.itemR(view, "open_mouse_over")
|
|
|
|
colsplitcol.itemL(text="Menu Open Delay:")
|
|
|
|
colsplitcol.itemR(view, "open_toplevel_delay", text="Top Level")
|
|
|
|
colsplitcol.itemR(view, "open_sublevel_delay", text="Sub Level")
|
|
|
|
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
2009-07-16 10:32:21 +00:00
|
|
|
#manipulator
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemR(view, "use_manipulator")
|
|
|
|
colsub = colsplitcol.column()
|
2009-07-16 10:32:21 +00:00
|
|
|
colsub.enabled = view.use_manipulator
|
|
|
|
colsub.itemR(view, "manipulator_size", text="Size")
|
|
|
|
colsub.itemR(view, "manipulator_handle_size", text="Handle Size")
|
|
|
|
colsub.itemR(view, "manipulator_hotspot", text="Hotspot")
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Toolbox:")
|
|
|
|
colsplitcol.itemR(view, "use_column_layout")
|
|
|
|
colsplitcol.itemL(text="Open Toolbox Delay:")
|
|
|
|
colsplitcol.itemR(view, "open_left_mouse_delay", text="Hold LMB")
|
|
|
|
colsplitcol.itemR(view, "open_right_mouse_delay", text="Hold RMB")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
class INFO_PT_edit(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Edit"
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'EDIT_METHODS')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
edit = userpref.edit
|
2009-07-17 12:35:57 +00:00
|
|
|
view = userpref.view
|
|
|
|
|
2009-07-16 10:32:21 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
|
|
|
|
colsplitcol.itemL(text="Materials:")
|
|
|
|
colsplitcol.itemR(edit, "material_linked_object", text="Linked to Object")
|
|
|
|
colsplitcol.itemR(edit, "material_linked_obdata", text="Linked to ObData")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
|
|
|
|
colsplitcol.itemL(text="New Objects:")
|
|
|
|
colsplitcol.itemR(edit, "enter_edit_mode")
|
|
|
|
colsplitcol.itemR(edit, "align_to_view")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
|
|
|
|
colsplitcol.itemL(text="Transform:")
|
|
|
|
colsplitcol.itemR(edit, "drag_immediately")
|
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
colsplitcol.itemL(text="Snap:")
|
|
|
|
colsplitcol.itemR(edit, "snap_translate", text="Translate")
|
|
|
|
colsplitcol.itemR(edit, "snap_rotate", text="Rotate")
|
|
|
|
colsplitcol.itemR(edit, "snap_scale", text="Scale")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Grease Pencil:")
|
|
|
|
colsplitcol.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
|
|
|
|
colsplitcol.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
|
|
|
|
colsplitcol.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
|
|
|
|
colsplitcol.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
|
|
|
|
colsplitcol.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
|
|
|
|
colsplitcol.itemL(text="Keyframing:")
|
|
|
|
colsplitcol.itemR(edit, "use_visual_keying")
|
|
|
|
colsplitcol.itemR(edit, "new_interpolation_type")
|
|
|
|
colsplitcol.itemR(edit, "auto_keying_enable", text="Auto Keyframing")
|
|
|
|
colsub = colsplitcol.column()
|
2009-07-16 10:32:21 +00:00
|
|
|
colsub.enabled = edit.auto_keying_enable
|
|
|
|
row = colsub.row()
|
|
|
|
row.itemR(edit, "auto_keying_mode", expand=True)
|
|
|
|
colsub.itemR(edit, "auto_keyframe_insert_available", text="Only Insert Available")
|
|
|
|
colsub.itemR(edit, "auto_keyframe_insert_needed", text="Only Insert Needed")
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
|
|
|
|
colsplitcol.itemL(text="Undo:")
|
|
|
|
colsplitcol.itemR(edit, "global_undo")
|
|
|
|
colsplitcol.itemR(edit, "undo_steps", text="Steps")
|
|
|
|
colsplitcol.itemR(edit, "undo_memory_limit", text="Memory Limit")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
|
|
|
|
2009-07-16 10:32:21 +00:00
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
colsplitcol.itemL(text="Duplicate:")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_mesh", text="Mesh")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_surface", text="Surface")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_curve", text="Curve")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_text", text="Text")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_metaball", text="Metaball")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_armature", text="Armature")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_lamp", text="Lamp")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_material", text="Material")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_texture", text="Texture")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_ipo", text="F-Curve")
|
|
|
|
colsplitcol.itemR(edit, "duplicate_action", text="Action")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
class INFO_PT_system(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "System"
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'SYSTEM_OPENGL')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
system = userpref.system
|
|
|
|
lan = userpref.language
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
|
|
|
colsplitcol.itemR(system, "emulate_numpad")
|
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
2009-07-16 10:32:21 +00:00
|
|
|
#Weight Colors
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Weight Colors:")
|
|
|
|
colsplitcol.itemR(system, "use_weight_color_range", text="Use Custom Range")
|
2009-07-24 14:30:40 +00:00
|
|
|
|
|
|
|
colsub = colsplitcol.column()
|
|
|
|
colsub.active = system.use_weight_color_range
|
|
|
|
colsub.template_color_ramp(system.weight_color_range, expand=True)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemS()
|
|
|
|
colsplitcol.itemS()
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
#sequencer
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Sequencer:")
|
|
|
|
colsplitcol.itemR(system, "prefetch_frames")
|
|
|
|
colsplitcol.itemR(system, "memory_cache_limit")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
2009-07-16 10:32:21 +00:00
|
|
|
#System
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="System:")
|
|
|
|
colsplitcol.itemR(lan, "dpi")
|
|
|
|
colsplitcol.itemR(system, "enable_all_codecs")
|
|
|
|
colsplitcol.itemR(system, "auto_run_python_scripts")
|
|
|
|
colsplitcol.itemR(system, "frame_server_port")
|
|
|
|
colsplitcol.itemR(system, "game_sound")
|
|
|
|
colsplitcol.itemR(system, "filter_file_extensions")
|
|
|
|
colsplitcol.itemR(system, "hide_dot_files_datablocks")
|
|
|
|
colsplitcol.itemR(system, "audio_mixing_buffer")
|
2009-07-26 04:31:46 +00:00
|
|
|
colsplitcol.itemR(lan, "scrollback", text="Console Scrollback")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.85)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
2009-07-16 10:32:21 +00:00
|
|
|
#OpenGL
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="OpenGL:")
|
|
|
|
colsplitcol.itemR(system, "clip_alpha", slider=True)
|
|
|
|
colsplitcol.itemR(system, "use_mipmaps")
|
2009-07-25 21:33:43 +00:00
|
|
|
colsplitcol.itemL(text="Window Draw Method:")
|
2009-07-17 12:35:57 +00:00
|
|
|
row = colsplitcol.row()
|
2009-07-16 10:32:21 +00:00
|
|
|
row.itemR(system, "window_draw_method", expand=True)
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemL(text="Textures:")
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplitcol.itemR(system, "gl_texture_limit", text="Limit Size")
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol.itemR(system, "texture_time_out", text="Time Out")
|
|
|
|
colsplitcol.itemR(system, "texture_collection_rate", text="Collection Rate")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
class INFO_PT_filepaths(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "File Paths"
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'FILE_PATHS')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
paths = userpref.filepaths
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
col.itemL(text="File Paths:")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-07-24 14:30:40 +00:00
|
|
|
splitcol.itemL(text="Fonts:")
|
|
|
|
splitcol.itemR(paths, "fonts_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Textures:")
|
|
|
|
splitcol.itemR(paths, "textures_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Texture Plugins:")
|
|
|
|
splitcol.itemR(paths, "texture_plugin_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Sequence Plugins:")
|
|
|
|
splitcol.itemR(paths, "sequence_plugin_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Render Output:")
|
|
|
|
splitcol.itemR(paths, "render_output_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Scripts:")
|
|
|
|
splitcol.itemR(paths, "python_scripts_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Sounds:")
|
|
|
|
splitcol.itemR(paths, "sounds_directory", text="")
|
|
|
|
splitcol = col.split(percentage=0.3)
|
|
|
|
splitcol.itemL(text="Temp:")
|
|
|
|
splitcol.itemR(paths, "temporary_directory", text="")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplit = col.split(percentage=0.2)
|
|
|
|
colsplitcol = colsplit.column()
|
2009-07-17 12:35:57 +00:00
|
|
|
colsplitcol = colsplit.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsplitcol.itemL(text="Save & Load:")
|
|
|
|
colsplitcol.itemR(paths, "use_relative_paths")
|
|
|
|
colsplitcol.itemR(paths, "compress_file")
|
|
|
|
colsplitcol.itemL(text="Auto Save:")
|
|
|
|
colsplitcol.itemR(paths, "save_version")
|
|
|
|
colsplitcol.itemR(paths, "recent_files")
|
|
|
|
colsplitcol.itemR(paths, "save_preview_images")
|
|
|
|
colsplitcol.itemR(paths, "auto_save_temporary_files")
|
2009-07-17 12:35:57 +00:00
|
|
|
colsub = colsplitcol.column()
|
2009-07-24 14:30:40 +00:00
|
|
|
colsub.enabled = paths.auto_save_temporary_files
|
|
|
|
colsub.itemR(paths, "auto_save_time")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
class INFO_PT_language(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = "Language"
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
def poll(self, context):
|
|
|
|
userpref = context.user_preferences
|
|
|
|
return (userpref.active_section == 'LANGUAGE_COLORS')
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
lan = userpref.language
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
col.itemR(lan, "language")
|
|
|
|
col.itemR(lan, "translate_tooltips")
|
|
|
|
col.itemR(lan, "translate_buttons")
|
|
|
|
col.itemR(lan, "translate_toolbox")
|
|
|
|
col.itemR(lan, "use_textured_fonts")
|
|
|
|
|
|
|
|
class INFO_PT_bottombar(bpy.types.Panel):
|
|
|
|
__space_type__ = "USER_PREFERENCES"
|
|
|
|
__label__ = " "
|
2009-07-26 03:54:17 +00:00
|
|
|
__show_header__ = False
|
2009-07-16 10:32:21 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
userpref = context.user_preferences
|
|
|
|
|
|
|
|
split = layout.split(percentage=0.8)
|
|
|
|
split.itemL(text="")
|
2009-07-24 12:45:25 +00:00
|
|
|
layout.operator_context = "EXEC_AREA"
|
2009-07-17 12:26:40 +00:00
|
|
|
split.itemO("wm.save_homefile", text="Save As Default")
|
2009-07-16 10:32:21 +00:00
|
|
|
|
2009-06-30 19:20:45 +00:00
|
|
|
bpy.types.register(INFO_HT_header)
|
|
|
|
bpy.types.register(INFO_MT_file)
|
2009-07-23 21:35:11 +00:00
|
|
|
bpy.types.register(INFO_MT_file_import)
|
|
|
|
bpy.types.register(INFO_MT_file_export)
|
2009-06-30 19:20:45 +00:00
|
|
|
bpy.types.register(INFO_MT_file_external_data)
|
|
|
|
bpy.types.register(INFO_MT_add)
|
|
|
|
bpy.types.register(INFO_MT_game)
|
|
|
|
bpy.types.register(INFO_MT_render)
|
|
|
|
bpy.types.register(INFO_MT_help)
|
2009-07-15 19:19:43 +00:00
|
|
|
bpy.types.register(INFO_PT_tabs)
|
|
|
|
bpy.types.register(INFO_PT_view)
|
2009-07-16 10:32:21 +00:00
|
|
|
bpy.types.register(INFO_PT_edit)
|
|
|
|
bpy.types.register(INFO_PT_system)
|
|
|
|
bpy.types.register(INFO_PT_filepaths)
|
|
|
|
bpy.types.register(INFO_PT_language)
|
|
|
|
bpy.types.register(INFO_PT_bottombar)
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-07-23 21:35:11 +00:00
|
|
|
# Help operators
|
|
|
|
|
|
|
|
import bpy_ops # XXX - should not need to do this
|
|
|
|
del bpy_ops
|
|
|
|
|
|
|
|
class HelpOperator(bpy.types.Operator):
|
|
|
|
def execute(self, context):
|
|
|
|
try: import webbrowser
|
|
|
|
except: webbrowser = None
|
|
|
|
|
|
|
|
if webbrowser:
|
|
|
|
webbrowser.open(self.__URL__)
|
|
|
|
else:
|
|
|
|
raise Exception("Operator requires a full Python installation")
|
|
|
|
|
|
|
|
return ('FINISHED',)
|
|
|
|
|
|
|
|
class HELP_OT_manual(HelpOperator):
|
|
|
|
__idname__ = "help.manual"
|
|
|
|
__label__ = "Manual"
|
|
|
|
__URL__ = 'http://wiki.blender.org/index.php/Manual'
|
|
|
|
|
|
|
|
class HELP_OT_release_logs(HelpOperator):
|
|
|
|
__idname__ = "help.release_logs"
|
|
|
|
__label__ = "Release Logs"
|
|
|
|
__URL__ = 'http://www.blender.org/development/release-logs/'
|
|
|
|
|
|
|
|
class HELP_OT_blender_website(HelpOperator):
|
|
|
|
__idname__ = "help.blender_website"
|
|
|
|
__label__ = "Blender Website"
|
|
|
|
__URL__ = 'http://www.blender.org/'
|
|
|
|
|
|
|
|
class HELP_OT_blender_eshop(HelpOperator):
|
|
|
|
__idname__ = "help.blender_eshop"
|
|
|
|
__label__ = "Blender e-Shop"
|
|
|
|
__URL__ = 'http://www.blender3d.org/e-shop'
|
|
|
|
|
|
|
|
class HELP_OT_developer_community(HelpOperator):
|
|
|
|
__idname__ = "help.developer_community"
|
|
|
|
__label__ = "Developer Community"
|
|
|
|
__URL__ = 'http://www.blender.org/community/get-involved/'
|
|
|
|
|
|
|
|
class HELP_OT_user_community(HelpOperator):
|
|
|
|
__idname__ = "help.user_community"
|
|
|
|
__label__ = "User Community"
|
|
|
|
__URL__ = 'http://www.blender.org/community/user-community/'
|
|
|
|
|
|
|
|
bpy.ops.add(HELP_OT_manual)
|
|
|
|
bpy.ops.add(HELP_OT_release_logs)
|
|
|
|
bpy.ops.add(HELP_OT_blender_website)
|
|
|
|
bpy.ops.add(HELP_OT_blender_eshop)
|
|
|
|
bpy.ops.add(HELP_OT_developer_community)
|
|
|
|
bpy.ops.add(HELP_OT_user_community)
|
|
|
|
|