Slight reorganization of user preferences. I've switched out the clunky use of splits with percentages and used simple rows instead.

This commit is contained in:
William Reynish 2009-12-15 14:22:34 +00:00
parent 8aa8efb327
commit 66880f62bb

@ -67,12 +67,10 @@ class USERPREF_PT_interface(bpy.types.Panel):
userpref = context.user_preferences userpref = context.user_preferences
view = userpref.view view = userpref.view
split = layout.split() row = layout.row()
column = split.column()
colsplit = column.split(percentage=0.85)
col = colsplit.column() col = row.column()
col.label(text="Display:") col.label(text="Display:")
col.prop(view, "tooltips") col.prop(view, "tooltips")
col.prop(view, "display_object_info", text="Object Info") col.prop(view, "display_object_info", text="Object Info")
@ -93,10 +91,11 @@ class USERPREF_PT_interface(bpy.types.Panel):
sub.prop(view, "mini_axis_size", text="Size") sub.prop(view, "mini_axis_size", text="Size")
sub.prop(view, "mini_axis_brightness", text="Brightness") sub.prop(view, "mini_axis_brightness", text="Brightness")
column = split.column()
colsplit = column.split(percentage=0.85)
col = colsplit.column() row.separator()
row.separator()
col = row.column()
col.label(text="View Manipulation:") col.label(text="View Manipulation:")
col.prop(view, "auto_depth") col.prop(view, "auto_depth")
col.prop(view, "global_pivot") col.prop(view, "global_pivot")
@ -109,19 +108,16 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.prop(view, "smooth_view") col.prop(view, "smooth_view")
col.prop(view, "rotation_angle") col.prop(view, "rotation_angle")
column = split.column() row.separator()
colsplit = column.split(percentage=0.85) row.separator()
col = colsplit.column()
col = row.column()
#Toolbox doesn't exist yet #Toolbox doesn't exist yet
#col.label(text="Toolbox:") #col.label(text="Toolbox:")
#col.prop(view, "use_column_layout") #col.prop(view, "use_column_layout")
#col.label(text="Open Toolbox Delay:") #col.label(text="Open Toolbox Delay:")
#col.prop(view, "open_left_mouse_delay", text="Hold LMB") #col.prop(view, "open_left_mouse_delay", text="Hold LMB")
#col.prop(view, "open_right_mouse_delay", text="Hold RMB") #col.prop(view, "open_right_mouse_delay", text="Hold RMB")
#Manipulator
col.prop(view, "use_manipulator") col.prop(view, "use_manipulator")
sub = col.column() sub = col.column()
sub.enabled = view.use_manipulator sub.enabled = view.use_manipulator
@ -156,12 +152,11 @@ class USERPREF_PT_edit(bpy.types.Panel):
userpref = context.user_preferences userpref = context.user_preferences
edit = userpref.edit edit = userpref.edit
split = layout.split()
column = split.column() row = layout.row()
colsplit = column.split(percentage=0.85)
col = colsplit.column()
col = row.column()
col.label(text="Link Materials To:") col.label(text="Link Materials To:")
col.row().prop(edit, "material_link", expand=True) col.row().prop(edit, "material_link", expand=True)
@ -183,10 +178,12 @@ class USERPREF_PT_edit(bpy.types.Panel):
col.prop(edit, "undo_steps", text="Steps") col.prop(edit, "undo_steps", text="Steps")
col.prop(edit, "undo_memory_limit", text="Memory Limit") col.prop(edit, "undo_memory_limit", text="Memory Limit")
column = split.column()
colsplit = column.split(percentage=0.85)
col = colsplit.column() row.separator()
row.separator()
col = row.column()
col.label(text="Snap:") col.label(text="Snap:")
col.prop(edit, "snap_translate", text="Translate") col.prop(edit, "snap_translate", text="Translate")
col.prop(edit, "snap_rotate", text="Rotate") col.prop(edit, "snap_rotate", text="Rotate")
@ -201,10 +198,12 @@ class USERPREF_PT_edit(bpy.types.Panel):
col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius") col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
col.prop(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke") col.prop(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
column = split.column()
colsplit = column.split(percentage=0.85)
col = colsplit.column() row.separator()
row.separator()
col = row.column()
col.label(text="Keyframing:") col.label(text="Keyframing:")
col.prop(edit, "use_visual_keying") col.prop(edit, "use_visual_keying")
col.prop(edit, "keyframe_insert_needed", text="Only Insert Needed") col.prop(edit, "keyframe_insert_needed", text="Only Insert Needed")
@ -232,14 +231,12 @@ class USERPREF_PT_edit(bpy.types.Panel):
col.label(text="Transform:") col.label(text="Transform:")
col.prop(edit, "drag_immediately") col.prop(edit, "drag_immediately")
col.separator()
col.separator()
col.separator()
column = split.column() row.separator()
colsplit = column.split(percentage=0.85) row.separator()
col = colsplit.column()
col = row.column()
col.label(text="Duplicate Data:") col.label(text="Duplicate Data:")
col.prop(edit, "duplicate_mesh", text="Mesh") col.prop(edit, "duplicate_mesh", text="Mesh")
col.prop(edit, "duplicate_surface", text="Surface") col.prop(edit, "duplicate_surface", text="Surface")
@ -305,11 +302,7 @@ class USERPREF_PT_system(bpy.types.Panel):
col.separator() col.separator()
col.separator() col.separator()
col.label(text="Weight Colors:")
col.prop(system, "use_weight_color_range", text="Use Custom Range")
sub = col.column()
sub.active = system.use_weight_color_range
sub.template_color_ramp(system, "weight_color_range", expand=True)
#column = split.column() #column = split.column()
#colsplit = column.split(percentage=0.85) #colsplit = column.split(percentage=0.85)
@ -328,38 +321,6 @@ class USERPREF_PT_system(bpy.types.Panel):
column = split.column() column = split.column()
colsplit = column.split(percentage=0.85) colsplit = column.split(percentage=0.85)
col1 = colsplit.column()
col1.label(text="Solid OpenGL lights:")
col = col1.split()
sub = col.column()
sub.prop(lamp0, "enabled")
subsub = sub.column()
subsub.active = lamp0.enabled
subsub.prop(lamp0, "diffuse_color")
subsub.prop(lamp0, "specular_color")
subsub.prop(lamp0, "direction")
sub = col.column()
sub.prop(lamp1, "enabled")
subsub = sub.column()
subsub.active = lamp1.enabled
subsub.prop(lamp1, "diffuse_color")
subsub.prop(lamp1, "specular_color")
subsub.prop(lamp1, "direction")
sub = col.column()
sub.prop(lamp2, "enabled")
subsub = sub.column()
subsub.active = lamp2.enabled
subsub.prop(lamp2, "diffuse_color")
subsub.prop(lamp2, "specular_color")
subsub.prop(lamp2, "direction")
column = split.column()
colsplit = column.split(percentage=0.85)
col = colsplit.column() col = colsplit.column()
col.label(text="OpenGL:") col.label(text="OpenGL:")
col.prop(system, "clip_alpha", slider=True) col.prop(system, "clip_alpha", slider=True)
@ -380,6 +341,92 @@ class USERPREF_PT_system(bpy.types.Panel):
col.prop(system, "prefetch_frames") col.prop(system, "prefetch_frames")
col.prop(system, "memory_cache_limit") col.prop(system, "memory_cache_limit")
column = split.column()
column.label(text="Solid OpenGL lights:")
split = column.split(percentage=0.1)
split.label()
split.label(text="Colors:")
split.label(text="Direction:")
split = column.split(percentage=0.1)
if lamp0.enabled == True:
split.prop(lamp0, "enabled", text="", icon='OUTLINER_OB_LAMP')
else:
split.prop(lamp0, "enabled", text="", icon='LAMP_DATA')
col = split.column()
col.active = lamp0.enabled
row = col.row()
row.label(text="Diffuse:")
row.prop(lamp0, "diffuse_color", text="")
row = col.row()
row.label(text="Specular:")
row.prop(lamp0, "specular_color", text="")
col = split.column()
col.active = lamp0.enabled
col.prop(lamp0, "direction", text="")
split = column.split(percentage=0.1)
if lamp1.enabled == True:
split.prop(lamp1, "enabled", text="", icon='OUTLINER_OB_LAMP')
else:
split.prop(lamp1, "enabled", text="", icon='LAMP_DATA')
col = split.column()
col.active = lamp1.enabled
row = col.row()
row.label(text="Diffuse:")
row.prop(lamp1, "diffuse_color", text="")
row = col.row()
row.label(text="Specular:")
row.prop(lamp1, "specular_color", text="")
col = split.column()
col.active = lamp1.enabled
col.prop(lamp1, "direction", text="")
split = column.split(percentage=0.1)
if lamp2.enabled == True:
split.prop(lamp2, "enabled", text="", icon='OUTLINER_OB_LAMP')
else:
split.prop(lamp2, "enabled", text="", icon='LAMP_DATA')
col = split.column()
col.active = lamp2.enabled
row = col.row()
row.label(text="Diffuse:")
row.prop(lamp2, "diffuse_color", text="")
row = col.row()
row.label(text="Specular:")
row.prop(lamp2, "specular_color", text="")
col = split.column()
col.active = lamp2.enabled
col.prop(lamp2, "direction", text="")
column.separator()
column.separator()
column.separator()
col = column.column()
col.prop(system, "use_weight_color_range", text="Custom Weight Paint Range")
sub = col.column()
sub.active = system.use_weight_color_range
sub.template_color_ramp(system, "weight_color_range", expand=True)
class USERPREF_PT_theme(bpy.types.Panel): class USERPREF_PT_theme(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES' bl_space_type = 'USER_PREFERENCES'
@ -1161,6 +1208,10 @@ class USERPREF_PT_input(bpy.types.Panel):
sub.label(text="Select With:") sub.label(text="Select With:")
sub.row().prop(inputs, "select_mouse", expand=True) sub.row().prop(inputs, "select_mouse", expand=True)
sub = col.column()
sub.label(text="Double Click:")
sub.prop(inputs, "double_click_time", text="Speed")
sub.separator() sub.separator()
sub.prop(inputs, "emulate_numpad") sub.prop(inputs, "emulate_numpad")
@ -1191,12 +1242,6 @@ class USERPREF_PT_input(bpy.types.Panel):
sub.prop(inputs, "ndof_pan_speed", text="Pan Speed") sub.prop(inputs, "ndof_pan_speed", text="Pan Speed")
sub.prop(inputs, "ndof_rotate_speed", text="Orbit Speed") sub.prop(inputs, "ndof_rotate_speed", text="Orbit Speed")
col.separator()
sub = col.column()
sub.label(text="Double Click:")
sub.prop(inputs, "double_click_time", text="Speed")
row.separator() row.separator()
# Keymap Settings # Keymap Settings