diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 77 |
1 files changed, 61 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 52b2fb7f3da..53999f3c154 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -5,8 +5,11 @@ from bpy.types import ( Menu, Panel, ) -from bpy.app.translations import pgettext_iface as iface_ -from bpy.app.translations import contexts as i18n_contexts +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, + pgettext_tip as tip_, +) # ----------------------------------------------------------------------------- @@ -106,7 +109,16 @@ class USERPREF_MT_save_load(Menu): sub_revert.operator("wm.read_userpref", text="Revert to Saved Preferences") layout.operator_context = 'INVOKE_AREA' - layout.operator("wm.read_factory_userpref", text="Load Factory Preferences") + + app_template = prefs.app_template + if app_template: + display_name = bpy.path.display_name(iface_(app_template)) + layout.operator("wm.read_factory_userpref", text="Load Factory Blender Preferences") + props = layout.operator("wm.read_factory_userpref", text="Load Factory %s Preferences" % display_name) + props.use_factory_startup_app_template_only = True + del display_name + else: + layout.operator("wm.read_factory_userpref", text="Load Factory Preferences") class USERPREF_PT_save_preferences(Panel): @@ -383,20 +395,20 @@ class USERPREF_PT_edit_objects_duplicate_data(EditingPanel, CenterAlignMixIn, Pa col.prop(edit, "use_duplicate_camera", text="Camera") col.prop(edit, "use_duplicate_curve", text="Curve") # col.prop(edit, "use_duplicate_fcurve", text="F-Curve") # Not implemented. + col.prop(edit, "use_duplicate_curves", text="Curves") col.prop(edit, "use_duplicate_grease_pencil", text="Grease Pencil") - if hasattr(edit, "use_duplicate_curves"): - col.prop(edit, "use_duplicate_curves", text="Curves") + col.prop(edit, "use_duplicate_lattice", text="Lattice") col = flow.column() - col.prop(edit, "use_duplicate_lattice", text="Lattice") col.prop(edit, "use_duplicate_light", text="Light") col.prop(edit, "use_duplicate_lightprobe", text="Light Probe") col.prop(edit, "use_duplicate_material", text="Material") col.prop(edit, "use_duplicate_mesh", text="Mesh") col.prop(edit, "use_duplicate_metaball", text="Metaball") + col.prop(edit, "use_duplicate_node_tree", text="Node Tree") + col.prop(edit, "use_duplicate_particle", text="Particle") col = flow.column() - col.prop(edit, "use_duplicate_particle", text="Particle") if hasattr(edit, "use_duplicate_pointcloud"): col.prop(edit, "use_duplicate_pointcloud", text="Point Cloud") col.prop(edit, "use_duplicate_speaker", text="Speaker") @@ -634,7 +646,7 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): layout.separator() col = layout.column() - col.prop(system, "vbo_time_out", text="Vbo Time Out") + col.prop(system, "vbo_time_out", text="VBO Time Out") col.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") @@ -650,7 +662,7 @@ class USERPREF_PT_system_video_sequencer(SystemPanel, CenterAlignMixIn, Panel): layout.separator() - layout.prop(system, "use_sequencer_disk_cache") + layout.prop(system, "use_sequencer_disk_cache", text="Disk Cache") col = layout.column() col.active = system.use_sequencer_disk_cache col.prop(system, "sequencer_disk_cache_dir", text="Directory") @@ -1532,6 +1544,23 @@ class USERPREF_PT_input_mouse(InputPanel, CenterAlignMixIn, Panel): flow.prop(inputs, "move_threshold") +class USERPREF_PT_input_touchpad(InputPanel, CenterAlignMixIn, Panel): + bl_label = "Touchpad" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + import sys + return sys.platform[:3] == "win" or sys.platform == "darwin" + + def draw_centered(self, context, layout): + prefs = context.preferences + inputs = prefs.inputs + + col = layout.column() + col.prop(inputs, "use_multitouch_gestures") + + class USERPREF_PT_input_tablet(InputPanel, CenterAlignMixIn, Panel): bl_label = "Tablet" @@ -1925,9 +1954,11 @@ class USERPREF_PT_addons(AddOnPanel, Panel): if is_visible: if search and not ( - (search in info["name"].lower()) or + (search in info["name"].lower() or + search in iface_(info["name"]).lower()) or (info["author"] and (search in info["author"].lower())) or - ((filter == "All") and (search in info["category"].lower())) + ((filter == "All") and (search in info["category"].lower() or + search in iface_(info["category"]).lower())) ): continue @@ -1951,7 +1982,7 @@ class USERPREF_PT_addons(AddOnPanel, Panel): sub = row.row() sub.active = is_enabled - sub.label(text="%s: %s" % (info["category"], info["name"])) + sub.label(text=iface_("%s: %s") % (iface_(info["category"]), iface_(info["name"]))) if info["warning"]: sub.label(icon='ERROR') @@ -1964,11 +1995,11 @@ class USERPREF_PT_addons(AddOnPanel, Panel): if info["description"]: split = colsub.row().split(factor=0.15) split.label(text="Description:") - split.label(text=info["description"]) + split.label(text=tip_(info["description"])) if info["location"]: split = colsub.row().split(factor=0.15) split.label(text="Location:") - split.label(text=info["location"]) + split.label(text=tip_(info["location"])) if mod: split = colsub.row().split(factor=0.15) split.label(text="File:") @@ -2090,7 +2121,10 @@ class StudioLightPanelMixin: for studio_light in lights: self.draw_studio_light(flow, studio_light) else: - layout.label(text=iface_("No custom %s configured") % self.bl_label) + layout.label(text=self.get_error_message()) + + def get_error_message(self): + return tip_("No custom %s configured") % self.bl_label def draw_studio_light(self, layout, studio_light): box = layout.box() @@ -2117,6 +2151,9 @@ class USERPREF_PT_studiolight_matcaps(StudioLightPanel, StudioLightPanelMixin, P layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'MATCAP' layout.separator() + def get_error_message(self): + return tip_("No custom MatCaps configured") + class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Panel): bl_label = "HDRIs" @@ -2127,6 +2164,9 @@ class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Pan layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'WORLD' layout.separator() + def get_error_message(self): + return tip_("No custom HDRIs configured") + class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Panel): bl_label = "Studio Lights" @@ -2139,6 +2179,9 @@ class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Pa op.filter_glob = ".sl" layout.separator() + def get_error_message(self): + return tip_("No custom Studio Lights configured") + class USERPREF_PT_studiolight_light_editor(StudioLightPanel, Panel): bl_label = "Editor" @@ -2258,6 +2301,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel): ({"property": "use_sculpt_tools_tilt"}, "T82877"), ({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")), ({"property": "use_override_templates"}, ("T73318", "Milestone 4")), + ({"property": "use_realtime_compositor"}, "T99210"), ), ) @@ -2274,7 +2318,6 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel): ({"property": "use_full_frame_compositor"}, "T88150"), ({"property": "enable_eevee_next"}, "T93220"), ({"property": "use_draw_manager_acquire_lock"}, "T98016"), - ({"property": "use_override_new_fully_editable"}, None), ), ) @@ -2311,6 +2354,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel): ({"property": "use_cycles_debug"}, None), ({"property": "show_asset_debug_info"}, None), ({"property": "use_asset_indexing"}, None), + ({"property": "use_viewport_debug"}, None), ), ) @@ -2394,6 +2438,7 @@ classes = ( USERPREF_PT_input_keyboard, USERPREF_PT_input_mouse, USERPREF_PT_input_tablet, + USERPREF_PT_input_touchpad, USERPREF_PT_input_ndof, USERPREF_PT_navigation_orbit, USERPREF_PT_navigation_zoom, |