patch from William, adds some rna user prefs and adjusts prefs UI.

This commit is contained in:
Campbell Barton 2009-07-17 12:35:57 +00:00
parent a705f64245
commit 802ca7f639
4 changed files with 269 additions and 204 deletions

@ -55,7 +55,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
class MATERIAL_PT_material(MaterialButtonsPanel): class MATERIAL_PT_material(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_material" __idname__= "MATERIAL_PT_material"
__label__ = "Material" __label__ = "Shading"
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@ -68,15 +68,41 @@ class MATERIAL_PT_material(MaterialButtonsPanel):
if mat: if mat:
layout.itemR(mat, "type", expand=True) layout.itemR(mat, "type", expand=True)
# row = layout.row()
if mat.type == 'SURFACE':
split = layout.split()
sub = split.column()
sub.itemR(mat, "alpha", slider=True)
sub.itemR(mat, "ambient", slider=True)
sub.itemR(mat, "emit")
sub.itemR(mat, "translucency", slider=True)
sub = split.column()
sub.itemR(mat, "shadeless")
sub.itemR(mat, "wireframe")
sub.itemR(mat, "tangent_shading")
sub.itemR(mat, "cubic", slider=True)
elif mat.type == 'VOLUME':
split = layout.split()
sub = split.column()
sub.itemR(mat, "alpha", slider=True)
sub.itemR(mat, "ambient", slider=True)
sub.itemR(mat, "emit")
sub.itemR(mat, "translucency", slider=True)
sub = split.column()
sub.itemR(mat, "shadeless")
sub.itemR(mat, "wireframe")
sub.itemR(mat, "tangent_shading")
sub.itemR(mat, "cubic", slider=True)
elif mat.type == 'HALO':
layout.itemR(mat, "alpha", slider=True) layout.itemR(mat, "alpha", slider=True)
row = layout.row()
row.active = mat.type in ('SURFACE', 'VOLUME')
row.itemR(mat, "shadeless")
row.itemR(mat, "wireframe")
rowsub = row.row()
rowsub.active = mat.shadeless== False
rowsub.itemR(mat, "tangent_shading")
class MATERIAL_PT_strand(MaterialButtonsPanel): class MATERIAL_PT_strand(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_strand" __idname__= "MATERIAL_PT_strand"
@ -126,6 +152,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
sub.itemR(mat, "full_oversampling") sub.itemR(mat, "full_oversampling")
sub.itemR(mat, "sky") sub.itemR(mat, "sky")
sub.itemR(mat, "exclude_mist") sub.itemR(mat, "exclude_mist")
sub = split.column()
sub.itemR(mat, "face_texture") sub.itemR(mat, "face_texture")
colsub = sub.column() colsub = sub.column()
colsub.active = mat.face_texture colsub.active = mat.face_texture
@ -134,14 +161,26 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
sub.itemR(mat, "light_group") sub.itemR(mat, "light_group")
sub.itemR(mat, "light_group_exclusive") sub.itemR(mat, "light_group_exclusive")
class MATERIAL_PT_shadows(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_shadows"
__label__ = "Shadows"
def draw(self, context):
layout = self.layout
mat = context.material
split = layout.split()
sub = split.column() sub = split.column()
sub.itemL(text="Shadows:")
sub.itemR(mat, "shadows", text="Recieve") sub.itemR(mat, "shadows", text="Recieve")
sub.itemR(mat, "transparent_shadows", text="Recieve Transparent") sub.itemR(mat, "transparent_shadows", text="Recieve Transparent")
sub.itemR(mat, "only_shadow", text="Shadows Only") sub.itemR(mat, "only_shadow", text="Shadows Only")
sub.itemR(mat, "cast_shadows_only", text="Cast Only") sub.itemR(mat, "cast_shadows_only", text="Cast Only")
sub.itemR(mat, "shadow_casting_alpha", text="Casting Alpha", slider=True) sub.itemR(mat, "shadow_casting_alpha", text="Casting Alpha", slider=True)
sub = split.column()
sub.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias") sub.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias")
colsub = sub.column() colsub = sub.column()
colsub.active = not mat.ray_shadow_bias colsub.active = not mat.ray_shadow_bias
@ -149,6 +188,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
sub.itemR(mat, "cast_buffer_shadows") sub.itemR(mat, "cast_buffer_shadows")
sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias") sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
class MATERIAL_PT_diffuse(MaterialButtonsPanel): class MATERIAL_PT_diffuse(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_diffuse" __idname__= "MATERIAL_PT_diffuse"
__label__ = "Diffuse" __label__ = "Diffuse"
@ -165,19 +205,15 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
sub = split.column() sub = split.column()
sub.itemR(mat, "diffuse_color", text="") sub.itemR(mat, "diffuse_color", text="")
sub.itemR(mat, "object_color") sub.itemR(mat, "vertex_color_paint")
colsub = sub.column() sub.itemR(mat, "vertex_color_light")
colsub.active = mat.shadeless== False
colsub.itemR(mat, "ambient", slider=True)
colsub.itemR(mat, "emit")
sub.itemR(mat, "translucency", slider=True)
sub = split.column() sub = split.column()
sub.active = mat.shadeless== False sub.active = mat.shadeless== False
sub.itemR(mat, "diffuse_reflection", text="Intensity", slider=True) sub.itemR(mat, "diffuse_reflection", text="Intensity", slider=True)
sub.itemR(mat, "vertex_color_light") sub.itemR(mat, "object_color")
sub.itemR(mat, "vertex_color_paint")
sub.itemR(mat, "cubic")
row = layout.row() row = layout.row()
row.active = mat.shadeless== False row.active = mat.shadeless== False
@ -235,8 +271,6 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
sub.itemR(mat, "specular_ior", text="IOR") sub.itemR(mat, "specular_ior", text="IOR")
if mat.spec_shader == 'WARDISO': if mat.spec_shader == 'WARDISO':
sub.itemR(mat, "specular_slope", text="Slope") sub.itemR(mat, "specular_slope", text="Slope")
sub = split.column()
sub.itemR(mat, "specular_hardness", text="Hardness")
if mat.spec_shader == 'TOON': if mat.spec_shader == 'TOON':
sub.itemR(mat, "specular_toon_size", text="Size") sub.itemR(mat, "specular_toon_size", text="Size")
sub = split.column() sub = split.column()
@ -438,3 +472,4 @@ bpy.types.register(MATERIAL_PT_sss)
bpy.types.register(MATERIAL_PT_halo) bpy.types.register(MATERIAL_PT_halo)
bpy.types.register(MATERIAL_PT_strand) bpy.types.register(MATERIAL_PT_strand)
bpy.types.register(MATERIAL_PT_options) bpy.types.register(MATERIAL_PT_options)
bpy.types.register(MATERIAL_PT_shadows)

@ -134,89 +134,92 @@ class INFO_PT_view(bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.itemL(text="Display:") colsplit = col.split(percentage=0.8)
col.itemR(view, "tooltips") colsplitcol = colsplit.column()
col.itemR(view, "display_object_info", text="Object Info") colsplitcol.itemL(text="Display:")
col.itemR(view, "use_large_cursors") colsplitcol.itemR(view, "tooltips")
col.itemR(view, "show_view_name", text="View Name") colsplitcol.itemR(view, "display_object_info", text="Object Info")
col.itemR(view, "show_playback_fps", text="Playback FPS") colsplitcol.itemR(view, "use_large_cursors")
col.itemR(view, "global_scene") colsplitcol.itemR(view, "show_view_name", text="View Name")
col.itemR(view, "pin_floating_panels") colsplitcol.itemR(view, "show_playback_fps", text="Playback FPS")
col.itemR(view, "object_center_size") colsplitcol.itemR(view, "global_scene")
col.itemS() colsplitcol.itemR(view, "pin_floating_panels")
col.itemS() colsplitcol.itemR(view, "object_center_size")
colsplitcol.itemS()
colsplitcol.itemS()
colsplitcol.itemS()
col.itemL(text="Menus:") colsplitcol.itemR(view, "show_mini_axis")
col.itemR(view, "open_mouse_over") colsub = colsplitcol.column()
col.itemL(text="Menu Open Delay:")
col.itemR(view, "open_toplevel_delay", text="Top Level")
col.itemR(view, "open_sublevel_delay", text="Sub Level")
col = split.column()
col.itemL(text="View Manipulation:")
col.itemR(view, "auto_depth")
col.itemR(view, "global_pivot")
col.itemR(view, "zoom_to_mouse")
col.itemL(text="Zoom Style:")
row = col.row()
row.itemR(view, "viewport_zoom_style", expand=True)
col.itemL(text="Orbit Style:")
row = col.row()
row.itemR(view, "view_rotation", expand=True)
col.itemR(view, "perspective_orthographic_switch")
col.itemR(view, "smooth_view")
col.itemR(view, "rotation_angle")
col.itemL(text="NDOF Device:")
col.itemR(view, "ndof_pan_speed", text="Pan Speed")
col.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
col = split.column()
col.itemL(text="Snap:")
col.itemR(view, "snap_translate", text="Translate")
col.itemR(view, "snap_rotate", text="Rotate")
col.itemR(view, "snap_scale", text="Scale")
col.itemS()
col.itemS()
col.itemL(text="Mouse Buttons:")
col.itemR(view, "left_mouse_button_select")
col.itemR(view, "right_mouse_button_select")
col.itemR(view, "emulate_3_button_mouse")
col.itemR(view, "use_middle_mouse_paste")
col.itemR(view, "middle_mouse_rotate")
col.itemR(view, "middle_mouse_pan")
col.itemR(view, "wheel_invert_zoom")
col.itemR(view, "wheel_scroll_lines")
col = split.column()
#Axis
col.itemL(text="Mini Axis:")
col.itemR(view, "show_mini_axis")
colsub = col.column()
colsub.enabled = view.show_mini_axis colsub.enabled = view.show_mini_axis
colsub.itemR(view, "mini_axis_size") colsub.itemR(view, "mini_axis_size")
colsub.itemR(view, "mini_axis_brightness") colsub.itemR(view, "mini_axis_brightness")
col.itemS()
col.itemS()
col = split.column()
colsplit = col.split(percentage=0.8)
colsplitcol = colsplit.column()
colsplitcol.itemL(text="View Manipulation:")
colsplitcol.itemR(view, "auto_depth")
colsplitcol.itemR(view, "global_pivot")
colsplitcol.itemR(view, "zoom_to_mouse")
colsplitcol.itemL(text="Zoom Style:")
row = colsplitcol.row()
row.itemR(view, "viewport_zoom_style", expand=True)
colsplitcol.itemL(text="Orbit Style:")
row = colsplitcol.row()
row.itemR(view, "view_rotation", expand=True)
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")
col = split.column()
colsplit = col.split(percentage=0.8)
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()
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")
col = split.column()
colsplit = col.split(percentage=0.8)
colsplitcol = colsplit.column()
#manipulator #manipulator
col.itemL(text="Manipulator:") colsplitcol.itemR(view, "use_manipulator")
col.itemR(view, "use_manipulator") colsub = colsplitcol.column()
colsub = col.column()
colsub.enabled = view.use_manipulator colsub.enabled = view.use_manipulator
colsub.itemR(view, "manipulator_size", text="Size") colsub.itemR(view, "manipulator_size", text="Size")
colsub.itemR(view, "manipulator_handle_size", text="Handle Size") colsub.itemR(view, "manipulator_handle_size", text="Handle Size")
colsub.itemR(view, "manipulator_hotspot", text="Hotspot") colsub.itemR(view, "manipulator_hotspot", text="Hotspot")
col.itemS() colsplitcol.itemS()
col.itemS() colsplitcol.itemS()
colsplitcol.itemS()
col.itemL(text="Toolbox:") colsplitcol.itemL(text="Toolbox:")
col.itemR(view, "use_column_layout") colsplitcol.itemR(view, "use_column_layout")
col.itemL(text="Open Toolbox Delay:") colsplitcol.itemL(text="Open Toolbox Delay:")
col.itemR(view, "open_left_mouse_delay", text="Hold LMB") colsplitcol.itemR(view, "open_left_mouse_delay", text="Hold LMB")
col.itemR(view, "open_right_mouse_delay", text="Hold RMB") colsplitcol.itemR(view, "open_right_mouse_delay", text="Hold RMB")
class INFO_PT_edit(bpy.types.Panel): class INFO_PT_edit(bpy.types.Panel):
@ -232,70 +235,90 @@ class INFO_PT_edit(bpy.types.Panel):
layout = self.layout layout = self.layout
userpref = context.user_preferences userpref = context.user_preferences
edit = userpref.edit edit = userpref.edit
view = userpref.view
split = layout.split() split = layout.split()
col = split.column() col = split.column()
#Materials colsplit = col.split(percentage=0.8)
col.itemL(text="Materials:") colsplitcol = colsplit.column()
col.itemR(edit, "material_linked_object", text="Linked to Object")
col.itemR(edit, "material_linked_obdata", text="Linked to ObData")
col.itemS()
col.itemS()
#New Objects colsplitcol.itemL(text="Materials:")
col.itemL(text="New Objects:") colsplitcol.itemR(edit, "material_linked_object", text="Linked to Object")
col.itemR(edit, "enter_edit_mode") colsplitcol.itemR(edit, "material_linked_obdata", text="Linked to ObData")
col.itemR(edit, "align_to_view") colsplitcol.itemS()
col.itemS() colsplitcol.itemS()
col.itemS() colsplitcol.itemS()
#Tranform colsplitcol.itemL(text="New Objects:")
col.itemL(text="Transform:") colsplitcol.itemR(edit, "enter_edit_mode")
col.itemR(edit, "drag_immediately") colsplitcol.itemR(edit, "align_to_view")
col.itemS() colsplitcol.itemS()
col.itemS() colsplitcol.itemS()
colsplitcol.itemS()
#undo colsplitcol.itemL(text="Transform:")
col.itemL(text="Undo:") colsplitcol.itemR(edit, "drag_immediately")
col.itemR(edit, "global_undo")
col.itemR(edit, "undo_steps", text="Steps")
col.itemR(edit, "undo_memory_limit", text="Memory Limit")
col = split.column() col = split.column()
#keying colsplit = col.split(percentage=0.8)
col.itemL(text="Keyframing:") colsplitcol = colsplit.column()
col.itemR(edit, "use_visual_keying") colsplitcol.itemL(text="Snap:")
col.itemR(edit, "new_interpolation_type") colsplitcol.itemR(edit, "snap_translate", text="Translate")
col.itemR(edit, "auto_keying_enable", text="Auto Keyframing") colsplitcol.itemR(edit, "snap_rotate", text="Rotate")
colsub = col.column() colsplitcol.itemR(edit, "snap_scale", text="Scale")
colsplitcol.itemS()
colsplitcol.itemS()
colsplitcol.itemS()
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")
col = split.column()
colsplit = col.split(percentage=0.8)
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()
colsub.enabled = edit.auto_keying_enable colsub.enabled = edit.auto_keying_enable
row = colsub.row() row = colsub.row()
row.itemR(edit, "auto_keying_mode", expand=True) 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_available", text="Only Insert Available")
colsub.itemR(edit, "auto_keyframe_insert_needed", text="Only Insert Needed") colsub.itemR(edit, "auto_keyframe_insert_needed", text="Only Insert Needed")
col.itemS() colsplitcol.itemS()
col.itemS() colsplitcol.itemS()
#greasepencil colsplitcol.itemS()
col.itemL(text="Grease Pencil:")
col.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance") colsplitcol.itemL(text="Undo:")
col.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance") colsplitcol.itemR(edit, "global_undo")
col.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke") colsplitcol.itemR(edit, "undo_steps", text="Steps")
col.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke") colsplitcol.itemR(edit, "undo_memory_limit", text="Memory Limit")
col.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius") colsplitcol.itemS()
colsplitcol.itemS()
colsplitcol.itemS()
col = split.column() col = split.column()
#Diplicate colsplit = col.split(percentage=0.8)
col.itemL(text="Duplicate:") colsplitcol = colsplit.column()
col.itemR(edit, "duplicate_mesh", text="Mesh") colsplitcol.itemL(text="Duplicate:")
col.itemR(edit, "duplicate_surface", text="Surface") colsplitcol.itemR(edit, "duplicate_mesh", text="Mesh")
col.itemR(edit, "duplicate_curve", text="Curve") colsplitcol.itemR(edit, "duplicate_surface", text="Surface")
col.itemR(edit, "duplicate_text", text="Text") colsplitcol.itemR(edit, "duplicate_curve", text="Curve")
col.itemR(edit, "duplicate_metaball", text="Metaball") colsplitcol.itemR(edit, "duplicate_text", text="Text")
col.itemR(edit, "duplicate_armature", text="Armature") colsplitcol.itemR(edit, "duplicate_metaball", text="Metaball")
col.itemR(edit, "duplicate_lamp", text="Lamp") colsplitcol.itemR(edit, "duplicate_armature", text="Armature")
col.itemR(edit, "duplicate_material", text="Material") colsplitcol.itemR(edit, "duplicate_lamp", text="Lamp")
col.itemR(edit, "duplicate_texture", text="Texture") colsplitcol.itemR(edit, "duplicate_material", text="Material")
col.itemR(edit, "duplicate_ipo", text="F-Curve") colsplitcol.itemR(edit, "duplicate_texture", text="Texture")
col.itemR(edit, "duplicate_action", text="Action") colsplitcol.itemR(edit, "duplicate_ipo", text="F-Curve")
colsplitcol.itemR(edit, "duplicate_action", text="Action")
class INFO_PT_system(bpy.types.Panel): class INFO_PT_system(bpy.types.Panel):
__space_type__ = "USER_PREFERENCES" __space_type__ = "USER_PREFERENCES"
@ -314,48 +337,51 @@ class INFO_PT_system(bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
colsplit = col.split(percentage=0.8)
col.itemR(system, "emulate_numpad") colsplitcol = colsplit.column()
col.itemS() colsplitcol.itemR(system, "emulate_numpad")
col.itemS() colsplitcol.itemS()
colsplitcol.itemS()
#Weight Colors #Weight Colors
col.itemL(text="Weight Colors:") colsplitcol.itemL(text="Weight Colors:")
col.itemR(system, "use_weight_color_range", text="Use Custom Range") colsplitcol.itemR(system, "use_weight_color_range", text="Use Custom Range")
col.itemR(system, "weight_color_range") colsplitcol.itemR(system, "weight_color_range")
col.itemS() colsplitcol.itemS()
col.itemS() colsplitcol.itemS()
#sequencer #sequencer
col.itemL(text="Sequencer:") colsplitcol.itemL(text="Sequencer:")
col.itemR(system, "prefetch_frames") colsplitcol.itemR(system, "prefetch_frames")
col.itemR(system, "memory_cache_limit") colsplitcol.itemR(system, "memory_cache_limit")
col = split.column() col = split.column()
colsplit = col.split(percentage=0.8)
colsplitcol = colsplit.column()
#System #System
col.itemL(text="System:") colsplitcol.itemL(text="System:")
col.itemR(lan, "dpi") colsplitcol.itemR(lan, "dpi")
col.itemR(system, "enable_all_codecs") colsplitcol.itemR(system, "enable_all_codecs")
col.itemR(system, "auto_run_python_scripts") colsplitcol.itemR(system, "auto_run_python_scripts")
col.itemR(system, "frame_server_port") colsplitcol.itemR(system, "frame_server_port")
col.itemR(system, "game_sound") colsplitcol.itemR(system, "game_sound")
col.itemR(system, "filter_file_extensions") colsplitcol.itemR(system, "filter_file_extensions")
col.itemR(system, "hide_dot_files_datablocks") colsplitcol.itemR(system, "hide_dot_files_datablocks")
col.itemR(system, "audio_mixing_buffer") colsplitcol.itemR(system, "audio_mixing_buffer")
col = split.column() col = split.column()
colsplit = col.split(percentage=0.8)
colsplitcol = colsplit.column()
#OpenGL #OpenGL
col.itemL(text="OpenGL:") colsplitcol.itemL(text="OpenGL:")
col.itemR(system, "clip_alpha", slider=True) colsplitcol.itemR(system, "clip_alpha", slider=True)
col.itemR(system, "use_mipmaps") colsplitcol.itemR(system, "use_mipmaps")
col.itemL(text="Windom Draw Method:") colsplitcol.itemL(text="Windom Draw Method:")
row = col.row() row = colsplitcol.row()
row.itemR(system, "window_draw_method", expand=True) row.itemR(system, "window_draw_method", expand=True)
col.itemL(text="Textures:") colsplitcol.itemL(text="Textures:")
col.itemR(system, "gl_texture_limit", text="Limit") colsplitcol.itemR(system, "gl_texture_limit", text="Limit")
col.itemR(system, "texture_time_out", text="Time Out") colsplitcol.itemR(system, "texture_time_out", text="Time Out")
col.itemR(system, "texture_collection_rate", text="Collection Rate") colsplitcol.itemR(system, "texture_collection_rate", text="Collection Rate")
class INFO_PT_filepaths(bpy.types.Panel): class INFO_PT_filepaths(bpy.types.Panel):
__space_type__ = "USER_PREFERENCES" __space_type__ = "USER_PREFERENCES"
@ -400,13 +426,17 @@ class INFO_PT_autosave(bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.itemR(save, "save_version") colsplit = col.split(percentage=0.8)
col.itemR(save, "recent_files") colsplitcol = colsplit.column()
col.itemR(save, "save_preview_images") colsplitcol.itemR(save, "save_version")
colsplitcol.itemR(save, "recent_files")
colsplitcol.itemR(save, "save_preview_images")
col = split.column() col = split.column()
col.itemR(save, "auto_save_temporary_files") colsplit = col.split(percentage=0.8)
colsub = col.column() colsplitcol = colsplit.column()
colsplitcol.itemR(save, "auto_save_temporary_files")
colsub = colsplitcol.column()
colsub.enabled = save.auto_save_temporary_files colsub.enabled = save.auto_save_temporary_files
colsub.itemR(save, "auto_save_time") colsub.itemR(save, "auto_save_time")

@ -97,7 +97,7 @@ static SpaceLink *console_new(const bContext *C)
ar->regiontype= RGN_TYPE_WINDOW; ar->regiontype= RGN_TYPE_WINDOW;
ar->v2d.scroll |= (V2D_SCROLL_LEFT); ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
ar->v2d.align |= V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */ ar->v2d.align |= V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */
ar->v2d.keepofs |= V2D_LOCKOFS_X; ar->v2d.keepofs |= V2D_LOCKOFS_X;
ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT); ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);

@ -1579,27 +1579,14 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER); RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction."); RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction.");
/* snap to grid */ prop= RNA_def_property(srna, "global_pivot", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOGRABGRID); RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views.");
RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects and sub-objects to grid units when moving.");
prop= RNA_def_property(srna, "snap_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOROTGRID);
RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects and sub-objects to grid units when rotating.");
prop= RNA_def_property(srna, "snap_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSIZEGRID);
RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and sub-objects to grid units when scaling.");
prop= RNA_def_property(srna, "auto_depth", PROP_BOOLEAN, PROP_NONE); prop= RNA_def_property(srna, "auto_depth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality."); RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality.");
prop= RNA_def_property(srna, "global_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views.");
/* view zoom */ /* view zoom */
prop= RNA_def_property(srna, "viewport_zoom_style", PROP_ENUM, PROP_NONE); prop= RNA_def_property(srna, "viewport_zoom_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom"); RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
@ -1778,6 +1765,19 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory."); RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory.");
/* snap to grid */
prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOGRABGRID);
RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects and sub-objects to grid units when moving.");
prop= RNA_def_property(srna, "snap_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOROTGRID);
RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects and sub-objects to grid units when rotating.");
prop= RNA_def_property(srna, "snap_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSIZEGRID);
RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and sub-objects to grid units when scaling.");
prop= RNA_def_property(srna, "auto_keying_enable", PROP_BOOLEAN, PROP_NONE); prop= RNA_def_property(srna, "auto_keying_enable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones."); RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones.");
@ -2176,9 +2176,9 @@ void RNA_def_userdef(BlenderRNA *brna)
PropertyRNA *prop; PropertyRNA *prop;
static EnumPropertyItem user_pref_sections[] = { static EnumPropertyItem user_pref_sections[] = {
{0, "VIEW_CONTROLS", 0, "View & Controls", ""}, {0, "VIEW_CONTROLS", 0, "View", ""},
{1, "EDIT_METHODS", 0, "Edit Methods", ""}, {1, "EDIT_METHODS", 0, "Editing", ""},
{2, "LANGUAGE_COLORS", 0, "Language & Colors", ""}, {2, "LANGUAGE_COLORS", 0, "Language", ""},
{3, "AUTO_SAVE", 0, "Auto Save", ""}, {3, "AUTO_SAVE", 0, "Auto Save", ""},
{4, "SYSTEM_OPENGL", 0, "System & OpenGL", ""}, {4, "SYSTEM_OPENGL", 0, "System & OpenGL", ""},
{5, "FILE_PATHS", 0, "File Paths", ""}, {5, "FILE_PATHS", 0, "File Paths", ""},