2.5: change a user preferences settings from .enabled to .active, it's nicer
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 23 Jul 2010 09:33:58 +0000 (09:33 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 23 Jul 2010 09:33:58 +0000 (09:33 +0000)
if the button is grayed out but still editable.

release/scripts/ui/space_userpref.py

index 2429f6e472c60f8e8da3399c7956b5eda1a50c61..b3629b03c2278180e9f7171f8fdabef5b5721cb0 100644 (file)
@@ -170,7 +170,7 @@ class USERPREF_PT_interface(bpy.types.Panel):
 
         col.prop(view, "show_mini_axis", text="Display Mini Axis")
         sub = col.column()
-        sub.enabled = view.show_mini_axis
+        sub.active = view.show_mini_axis
         sub.prop(view, "mini_axis_size", text="Size")
         sub.prop(view, "mini_axis_brightness", text="Brightness")
 
@@ -216,7 +216,7 @@ class USERPREF_PT_interface(bpy.types.Panel):
         #col.prop(view, "open_right_mouse_delay", text="Hold RMB")
         col.prop(view, "use_manipulator")
         sub = col.column()
-        sub.enabled = view.use_manipulator
+        sub.active = view.use_manipulator
         sub.prop(view, "manipulator_size", text="Size")
         sub.prop(view, "manipulator_handle_size", text="Handle Size")
         sub.prop(view, "manipulator_hotspot", text="Hotspot")
@@ -720,7 +720,7 @@ class USERPREF_PT_file(bpy.types.Panel):
         col.prop(paths, "save_preview_images")
         col.prop(paths, "auto_save_temporary_files")
         sub = col.column()
-        sub.enabled = paths.auto_save_temporary_files
+        sub.active = paths.auto_save_temporary_files
         sub.prop(paths, "auto_save_time", text="Timer (mins)")
 
 from space_userpref_keymap import InputKeyMapPanel
@@ -748,7 +748,7 @@ class USERPREF_PT_input(InputKeyMapPanel):
 
         sub.label(text="Mouse:")
         sub1 = sub.column()
-        sub1.enabled = (inputs.select_mouse == 'RIGHT')
+        sub1.active = (inputs.select_mouse == 'RIGHT')
         sub1.prop(inputs, "emulate_3_button_mouse")
         sub.prop(inputs, "continuous_mouse")