From beb98c9e0c17234572d152937cd7ca72f9240b59 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 20 Jul 2010 12:37:42 +0000 Subject: [PATCH] Bugfix #22872: invert zoom direction doesn't work The setting for this (IMO it should really be on by default, for reasons I've outlined recently) was not exposed at all. The setting that was shown was a new(?) option in 2.5 which dealt with Ctrl-MMB drag zoom. --- release/scripts/ui/space_userpref.py | 7 ++--- source/blender/makesrna/intern/rna_userdef.c | 28 ++++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index ac1b11282f3..2429f6e472c 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -352,7 +352,7 @@ class USERPREF_PT_edit(bpy.types.Panel): col.prop(edit, "duplicate_lamp", text="Lamp") col.prop(edit, "duplicate_material", text="Material") col.prop(edit, "duplicate_texture", text="Texture") - col.prop(edit, "duplicate_fcurve", text="F-Curve") + #col.prop(edit, "duplicate_fcurve", text="F-Curve") col.prop(edit, "duplicate_action", text="Action") col.prop(edit, "duplicate_particle", text="Particle") @@ -778,8 +778,9 @@ class USERPREF_PT_input(InputKeyMapPanel): #col.separator() - #sub = col.column() - #sub.label(text="Mouse Wheel:") + sub = col.column() + sub.label(text="Mouse Wheel:") + sub.prop(inputs, "wheel_invert_zoom", text="Invert Wheel Zoom Direction") #sub.prop(view, "wheel_scroll_lines", text="Scroll Lines") col.separator() diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 32d69e48adf..36c6b9b0a10 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1989,20 +1989,6 @@ static void rna_def_userdef_view(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon"); RNA_def_property_update(prop, 0, "rna_userdef_update"); - /* middle mouse button */ - prop= RNA_def_property(srna, "use_middle_mouse_paste", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE); - RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning"); - - prop= RNA_def_property(srna, "wheel_invert_zoom", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR); - RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction"); - - prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "wheellinescroll"); - RNA_def_property_range(prop, 0, 32); - RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel"); - prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx"); RNA_def_property_range(prop, 0, 1000); @@ -2672,6 +2658,20 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD); RNA_def_property_ui_text(prop, "Emulate Numpad", "Causes the 1 to 0 keys to act as the numpad (useful for laptops)"); + /* middle mouse button */ + prop= RNA_def_property(srna, "use_middle_mouse_paste", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE); + RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning"); + + prop= RNA_def_property(srna, "wheel_invert_zoom", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR); + RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction"); + + prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "wheellinescroll"); + RNA_def_property_range(prop, 0, 32); + RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel"); + /* U.keymaps - custom keymaps that have been edited from default configs */ prop= RNA_def_property(srna, "edited_keymaps", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "keymaps", NULL);