diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 22fb5af5c58..a26dbcf3c02 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -206,11 +206,10 @@ class USERPREF_PT_interface(Panel): col.prop(view, "show_view3d_cursor") -class USERPREF_PT_edit(Panel): +class USERPREF_PT_edit_undo(Panel): bl_space_type = 'USER_PREFERENCES' - bl_label = "Edit" + bl_label = "Undo" bl_region_type = 'WINDOW' - bl_options = {'HIDE_HEADER'} @classmethod def poll(cls, context): @@ -219,43 +218,85 @@ class USERPREF_PT_edit(Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. userpref = context.user_preferences edit = userpref.edit - split = layout.split() - row = split.row() + row = layout.row() + row.label() + col = row.column() + col.ui_units_x = 50 - col.label(text="Link Materials To:") - col.prop(edit, "material_link", text="") + col.prop(edit, "undo_steps", text="Steps") + col.prop(edit, "undo_memory_limit", text="Memory Limit") + col.prop(edit, "use_global_undo") - col.separator() - col.separator() - col.separator() + row.label() # Needed so col above is centered. - col.label(text="New Objects:") - col.prop(edit, "use_enter_edit_mode") - col.label(text="Align To:") - col.prop(edit, "object_align", text="") - col.separator() - col.separator() - col.separator() +class USERPREF_PT_edit_objects(Panel): + bl_space_type = 'USER_PREFERENCES' + bl_label = "Objects" + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} - col.label(text="Undo:") - col.prop(edit, "use_global_undo") - col.prop(edit, "undo_steps", text="Steps") - col.prop(edit, "undo_memory_limit", text="Memory Limit") + @classmethod + def poll(cls, context): + userpref = context.user_preferences + return (userpref.active_section == 'EDITING') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + userpref = context.user_preferences + edit = userpref.edit + + row = layout.row() + row.label() - row = split.row() - row.separator() col = row.column() + col.ui_units_x = 50 + + col.prop(edit, "material_link", text="Link Materials to") + col.prop(edit, "object_align", text="Align New Objects to") + col.prop(edit, "use_enter_edit_mode", text="Enter Edit Mode for New Objects") + + row.label() # Needed so col above is centered. + + +class USERPREF_PT_edit_gpencil(Panel): + bl_space_type = 'USER_PREFERENCES' + bl_label = "Grease Pencil & Annotations" + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + userpref = context.user_preferences + return (userpref.active_section == 'EDITING') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + userpref = context.user_preferences + edit = userpref.edit + + row = layout.row() + row.label() + + col = row.column() + col.ui_units_x = 50 - col.label(text="Grease Pencil/Annotations:") - col.separator() col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance") col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance") + col.separator() col.label(text="Annotations:") @@ -264,24 +305,35 @@ class USERPREF_PT_edit(Panel): col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius") col.separator() col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke") - col.separator() - col.separator() - col.separator() - col.separator() - col.label(text="Playback:") - col.prop(edit, "use_negative_frames") - col.separator() - col.label(text="Node Editor:") - col.prop(edit, "node_margin") - col.label(text="Animation Editors:") - col.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility") + row.label() # Needed so col above is centered. + + +class USERPREF_PT_edit_keyframing(Panel): + bl_space_type = 'USER_PREFERENCES' + bl_label = "Keyframing" + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + userpref = context.user_preferences + return (userpref.active_section == 'EDITING') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + userpref = context.user_preferences + edit = userpref.edit + + row = layout.row() + row.label() - row = split.row() - row.separator() col = row.column() + col.ui_units_x = 50 - col.label(text="Keyframing:") col.prop(edit, "use_visual_keying") col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed") @@ -302,37 +354,121 @@ class USERPREF_PT_edit(Panel): col.prop(edit, "keyframe_new_handle_type", text="Handles") col.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB") - col.separator() - col.separator() - col.separator() + row.label() # Needed so col above is centered. + + +class USERPREF_PT_edit_transform(Panel): + bl_space_type = 'USER_PREFERENCES' + bl_label = "Transform" + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + userpref = context.user_preferences + return (userpref.active_section == 'EDITING') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + userpref = context.user_preferences + edit = userpref.edit + + row = layout.row() + row.label() + + col = row.column() + col.ui_units_x = 50 - col.label(text="Transform:") col.prop(edit, "use_drag_immediately") col.prop(edit, "use_numeric_input_advanced") - row = split.row() - row.separator() - col = row.column() + row.label() # Needed so col above is centered. - col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") - col.separator() - col.separator() - col.separator() +class USERPREF_PT_edit_duplicate_data(Panel): + bl_space_type = 'USER_PREFERENCES' + bl_label = "Duplicate Data" + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} - col.label(text="Duplicate Data:") - col.prop(edit, "use_duplicate_mesh", text="Mesh") - col.prop(edit, "use_duplicate_surface", text="Surface") - col.prop(edit, "use_duplicate_curve", text="Curve") - col.prop(edit, "use_duplicate_text", text="Text") - col.prop(edit, "use_duplicate_metaball", text="Metaball") + @classmethod + def poll(cls, context): + userpref = context.user_preferences + return (userpref.active_section == 'EDITING') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + userpref = context.user_preferences + edit = userpref.edit + + row = layout.row() + row.label() + + col = row.column() + col.ui_units_x = 50 + + flow = col.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + col = flow.column() + col.prop(edit, "use_duplicate_action", text="Action") col.prop(edit, "use_duplicate_armature", text="Armature") + col.prop(edit, "use_duplicate_curve", text="Curve") + #col.prop(edit, "use_duplicate_fcurve", text="F-Curve") col.prop(edit, "use_duplicate_light", text="Light") + col = flow.column() col.prop(edit, "use_duplicate_material", text="Material") - col.prop(edit, "use_duplicate_texture", text="Texture") - #col.prop(edit, "use_duplicate_fcurve", text="F-Curve") - col.prop(edit, "use_duplicate_action", text="Action") + col.prop(edit, "use_duplicate_mesh", text="Mesh") + col.prop(edit, "use_duplicate_metaball", text="Metaball") col.prop(edit, "use_duplicate_particle", text="Particle") + col = flow.column() + col.prop(edit, "use_duplicate_surface", text="Surface") + col.prop(edit, "use_duplicate_text", text="Text") + col.prop(edit, "use_duplicate_texture", text="Texture") + + row.label() # Needed so col above is centered. + + +class USERPREF_PT_edit_misc(Panel): + bl_space_type = 'USER_PREFERENCES' + bl_label = "Miscellaneous" + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + userpref = context.user_preferences + return (userpref.active_section == 'EDITING') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + userpref = context.user_preferences + edit = userpref.edit + + row = layout.row() + row.label() + + col = row.column() + col.ui_units_x = 50 + + col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") + col.prop(edit, "node_margin", text="Node Editor Auto-offset Margin") + + col.separator() + + col.label(text="Animation:") + col.prop(edit, "use_negative_frames") + col.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility") + + row.label() # Needed so col above is centered. class USERPREF_PT_system_general(Panel): @@ -1578,7 +1714,15 @@ classes = ( USERPREF_HT_header, USERPREF_PT_navigation, USERPREF_PT_interface, - USERPREF_PT_edit, + + USERPREF_PT_edit_undo, + USERPREF_PT_edit_objects, + USERPREF_PT_edit_gpencil, + USERPREF_PT_edit_keyframing, + USERPREF_PT_edit_transform, + USERPREF_PT_edit_duplicate_data, + USERPREF_PT_edit_misc, + USERPREF_PT_system_general, USERPREF_MT_interface_theme_presets, USERPREF_PT_theme,