diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 106 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 45 |
2 files changed, 73 insertions, 78 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index d4d5d319f9e..c1d8f02afe8 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -123,7 +123,6 @@ class USERPREF_PT_interface_display(PreferencePanel): class USERPREF_PT_interface_display_info(PreferencePanel): bl_label = "Information" bl_parent_id = "USERPREF_PT_interface_display" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -162,7 +161,6 @@ class USERPREF_PT_interface_text(PreferencePanel): class USERPREF_PT_interface_text_translate(PreferencePanel): bl_label = "Translate UI" - bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "USERPREF_PT_interface_text" @classmethod @@ -292,9 +290,11 @@ class USERPREF_PT_interface_menus(PreferencePanel): def draw_props(self, context, layout): prefs = context.preferences view = prefs.view + system = prefs.system layout.prop(view, "color_picker_type") layout.row().prop(view, "header_align_default", expand=True) + layout.prop(system, "use_region_overlap") layout.prop(view, "show_splash") layout.prop(view, "use_quit_dialog") @@ -303,7 +303,6 @@ class USERPREF_PT_interface_menus(PreferencePanel): class USERPREF_PT_interface_menus_mouse_over(PreferencePanel): bl_label = "Open on Mouse Over" bl_parent_id = "USERPREF_PT_interface_menus" - bl_options = {'DEFAULT_CLOSED'} def draw_header(self, context): prefs = context.preferences @@ -324,7 +323,6 @@ class USERPREF_PT_interface_menus_mouse_over(PreferencePanel): class USERPREF_PT_interface_menus_pie(PreferencePanel): bl_label = "Pie Menus" bl_parent_id = "USERPREF_PT_interface_menus" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -338,8 +336,9 @@ class USERPREF_PT_interface_menus_pie(PreferencePanel): class USERPREF_PT_interface_templates(PreferencePanel): - bl_label = "Templates" + bl_label = "Application Templates" bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "USERPREF_PT_interface_develop" @classmethod def poll(cls, context): @@ -350,7 +349,7 @@ class USERPREF_PT_interface_templates(PreferencePanel): prefs = context.preferences view = prefs.view - layout.label(text="Options intended for use with app-templates only") + layout.label(text="Options intended for developing application templates only") layout.prop(view, "show_layout_ui") @@ -392,7 +391,6 @@ class USERPREF_PT_edit_animation(PreferencePanel): class USERPREF_PT_edit_animation_autokey(PreferencePanel): bl_label = "Auto-Keyframing" - bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "USERPREF_PT_edit_animation" def draw_header(self, context): @@ -411,7 +409,6 @@ class USERPREF_PT_edit_animation_autokey(PreferencePanel): class USERPREF_PT_edit_animation_fcurves(PreferencePanel): bl_label = "F-Curves" - bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "USERPREF_PT_edit_animation" def draw_props(self, context, layout): @@ -427,26 +424,10 @@ class USERPREF_PT_edit_animation_fcurves(PreferencePanel): layout.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility") -class USERPREF_PT_edit_transform(PreferencePanel): - bl_label = "Transform" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - prefs = context.preferences - return (prefs.active_section == 'EDITING') - - def draw_props(self, context, layout): - prefs = context.preferences - edit = prefs.edit - - layout.prop(edit, "use_drag_immediately") - layout.prop(edit, "use_numeric_input_advanced") - - class USERPREF_PT_edit_duplicate_data(PreferencePanel): bl_label = "Duplicate Data" bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "USERPREF_PT_edit_objects" @classmethod def poll(cls, context): @@ -525,7 +506,24 @@ class USERPREF_PT_edit_misc(PreferencePanel): edit = prefs.edit layout.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") - layout.prop(edit, "node_margin", text="Node Editor Auto-offset Margin") + layout.prop(edit, "node_margin", text="Node Auto-offset Margin") + + +class USERPREF_PT_edit_cursor(PreferencePanel): + bl_label = "3D Cursor" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + prefs = context.preferences + return (prefs.active_section == 'EDITING') + + def draw_props(self, context, layout): + prefs = context.preferences + edit = prefs.edit + + layout.prop(edit, "use_mouse_depth_cursor") + layout.prop(edit, "use_cursor_lock_adjust") class USERPREF_PT_system_sound(PreferencePanel): @@ -599,13 +597,10 @@ class USERPREF_PT_system_opengl(PreferencePanel): layout.label(text="Might fail for Mesh editing selection!") layout.separator() - layout.prop(system, "use_region_overlap") - class USERPREF_PT_system_opengl_textures(PreferencePanel): bl_label = "Textures" bl_parent_id = "USERPREF_PT_system_opengl" - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): @@ -629,7 +624,6 @@ class USERPREF_PT_system_opengl_textures(PreferencePanel): class USERPREF_PT_system_opengl_selection(PreferencePanel): bl_label = "Selection" bl_parent_id = "USERPREF_PT_system_opengl" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -1155,9 +1149,8 @@ class USERPREF_PT_file_paths(Panel): layout.prop(paths, "image_editor", text="Image Editor") layout.prop(paths, "animation_player_preset", text="Playback Preset") - row = layout.row() - row.enabled = paths.animation_player_preset == 'CUSTOM' - row.prop(paths, "animation_player", text="Animation Player") + if paths.animation_player_preset == 'CUSTOM': + layout.prop(paths, "animation_player", text="Animation Player") class USERPREF_PT_file_autorun(Panel): @@ -1234,7 +1227,6 @@ class USERPREF_PT_file_saveload(PreferencePanel): class USERPREF_PT_file_saveload_autosave(PreferencePanel): bl_label = "Auto Save" bl_parent_id = "USERPREF_PT_file_saveload" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -1251,7 +1243,6 @@ class USERPREF_PT_file_saveload_autosave(PreferencePanel): class USERPREF_PT_file_saveload_texteditor(PreferencePanel): bl_label = "Text Editor" bl_parent_id = "USERPREF_PT_file_saveload" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -1328,6 +1319,7 @@ class USERPREF_PT_input_devices_keyboard(PreferencePanel): inputs = prefs.inputs layout.prop(inputs, "use_emulate_numpad") + layout.prop(inputs, "use_numeric_input_advanced") class USERPREF_PT_input_devices_mouse(PreferencePanel): @@ -1343,10 +1335,11 @@ class USERPREF_PT_input_devices_mouse(PreferencePanel): layout.prop(inputs, "mouse_double_click_time", text="Double Click Speed") layout.prop(inputs, "use_mouse_emulate_3_button") layout.prop(inputs, "use_mouse_continuous") + layout.prop(inputs, "use_drag_immediately") class USERPREF_PT_input_view(PreferencePanel): - bl_label = "View Manipulation" + bl_label = "View Navigation" bl_options = {'DEFAULT_CLOSED'} @classmethod @@ -1361,7 +1354,6 @@ class USERPREF_PT_input_view(PreferencePanel): class USERPREF_PT_input_view_orbit(PreferencePanel): bl_label = "Orbit & Pan" bl_parent_id = "USERPREF_PT_input_view" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): import sys @@ -1380,7 +1372,6 @@ class USERPREF_PT_input_view_orbit(PreferencePanel): class USERPREF_PT_input_view_zoom(PreferencePanel): bl_label = "Zoom" bl_parent_id = "USERPREF_PT_input_view" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -1396,33 +1387,31 @@ class USERPREF_PT_input_view_zoom(PreferencePanel): layout.prop(inputs, "use_zoom_to_mouse") -class USERPREF_PT_input_view_cursor(PreferencePanel): - bl_label = "Cursor" +class USERPREF_PT_input_view_fly_walk(PreferencePanel): + bl_label = "Fly & Walk" bl_parent_id = "USERPREF_PT_input_view" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences inputs = prefs.inputs - layout.prop(inputs, "use_mouse_depth_cursor") - layout.prop(inputs, "use_cursor_lock_adjust") + layout.row().prop(inputs, "navigation_mode", expand=True) + layout.prop(inputs, "use_camera_lock_parent") -class USERPREF_PT_input_view_fly_walk(PreferencePanel): - bl_label = "Fly & Walk" - bl_parent_id = "USERPREF_PT_input_view" +class USERPREF_PT_input_view_fly_walk_navigation(PreferencePanel): + bl_label = "Walk" + bl_parent_id = "USERPREF_PT_input_view_fly_walk" bl_options = {'DEFAULT_CLOSED'} + @classmethod + def poll(cls, context): + prefs = context.preferences + return prefs.inputs.navigation_mode == 'WALK' + def draw_props(self, context, layout): prefs = context.preferences inputs = prefs.inputs - - layout.row().prop(inputs, "navigation_mode", expand=True) - layout.prop(inputs, "use_camera_lock_parent") - - layout.label(text="Walk Navigation:") - walk = inputs.walk_navigation layout.prop(walk, "use_mouse_reverse") @@ -1437,6 +1426,12 @@ class USERPREF_PT_input_view_fly_walk(PreferencePanel): class USERPREF_PT_input_view_fly_walk_gravity(PreferencePanel): bl_label = "Gravity" bl_parent_id = "USERPREF_PT_input_view_fly_walk" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + prefs = context.preferences + return prefs.inputs.navigation_mode == 'WALK' def draw_header(self, context): prefs = context.preferences @@ -1458,7 +1453,6 @@ class USERPREF_PT_input_view_fly_walk_gravity(PreferencePanel): class USERPREF_PT_input_devices_tablet(PreferencePanel): bl_label = "Tablet" bl_parent_id = "USERPREF_PT_input_devices" - bl_options = {'DEFAULT_CLOSED'} def draw_props(self, context, layout): prefs = context.preferences @@ -1470,8 +1464,8 @@ class USERPREF_PT_input_devices_tablet(PreferencePanel): class USERPREF_PT_input_devices_ndof(PreferencePanel): bl_label = "NDOF" - bl_parent_id = "USERPREF_PT_input_devices" bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "USERPREF_PT_input_devices" @classmethod def poll(cls, context): @@ -2003,10 +1997,10 @@ classes += ( USERPREF_PT_edit_animation, USERPREF_PT_edit_animation_autokey, USERPREF_PT_edit_animation_fcurves, - USERPREF_PT_edit_transform, USERPREF_PT_edit_duplicate_data, USERPREF_PT_edit_gpencil, USERPREF_PT_edit_annotations, + USERPREF_PT_edit_cursor, USERPREF_PT_edit_misc, USERPREF_PT_system_opengl, @@ -2042,8 +2036,8 @@ classes += ( USERPREF_PT_input_view, USERPREF_PT_input_view_orbit, USERPREF_PT_input_view_zoom, - USERPREF_PT_input_view_cursor, USERPREF_PT_input_view_fly_walk, + USERPREF_PT_input_view_fly_walk_navigation, USERPREF_PT_input_view_fly_walk_gravity, USERPREF_PT_keymap, diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7c7a484dd49..d8d11af6bd5 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -4070,18 +4070,6 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE); RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object"); - prop = RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM); - RNA_def_property_ui_text(prop, "Release confirms", - "Moving things with a mouse drag confirms when releasing the button"); - - prop = RNA_def_property(srna, "use_numeric_input_advanced", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FLAG_NUMINPUT_ADVANCED); - RNA_def_property_ui_text( - prop, "Default to Advanced Numeric Input", - "When entering numbers while transforming, " - "default to advanced mode for full math expression evaluation"); - /* Undo */ prop = RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE); @@ -4256,6 +4244,17 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "node_margin"); RNA_def_property_ui_text(prop, "Auto-offset Margin", "Minimum distance between nodes for Auto-offsetting nodes"); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + /* cursor */ + prop = RNA_def_property(srna, "use_cursor_lock_adjust", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCK_CURSOR_ADJUST); + RNA_def_property_ui_text(prop, "Cursor Lock Adjust", + "Place the cursor without 'jumping' to the new location (when lock-to-cursor is used)"); + + prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_CURSOR); + RNA_def_property_ui_text(prop, "Cursor Surface Project", + "Use the surface depth for cursor placement"); } static void rna_def_userdef_system(BlenderRNA *brna) @@ -4626,21 +4625,11 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT); RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming"); - prop = RNA_def_property(srna, "use_cursor_lock_adjust", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCK_CURSOR_ADJUST); - RNA_def_property_ui_text(prop, "Cursor Lock Adjust", - "Place the cursor without 'jumping' to the new location (when lock-to-cursor is used)"); - prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_NAVIGATE); 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, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_CURSOR); - RNA_def_property_ui_text(prop, "Cursor Surface Project", - "Use the surface depth for cursor placement"); - prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT); RNA_def_property_ui_text(prop, "Camera Parent Lock", @@ -4676,6 +4665,18 @@ static void rna_def_userdef_input(BlenderRNA *brna) "Allow moving the mouse outside the view on some manipulations " "(transform, ui control drag)"); + prop = RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM); + RNA_def_property_ui_text(prop, "Release Confirms", + "Moving things with a mouse drag confirms when releasing the button"); + + prop = RNA_def_property(srna, "use_numeric_input_advanced", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FLAG_NUMINPUT_ADVANCED); + RNA_def_property_ui_text( + prop, "Default to Advanced Numeric Input", + "When entering numbers while transforming, " + "default to advanced mode for full math expression evaluation"); + /* View Navigation */ prop = RNA_def_property(srna, "navigation_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "navigation_mode"); |