diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-06-26 13:57:10 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-06-26 13:57:10 +0300 |
commit | b5640df6c017ee15571e217a782a87dc85f4de3c (patch) | |
tree | 03acba02adc1013f7f49b5a466a9e479a16adcb6 /release/scripts/startup/bl_ui | |
parent | 302499b4a69a7d16eca7d0f1d7e621e8b9591e3c (diff) | |
parent | e3a420c4773a1d1a79c21f15137066d4411d3574 (diff) |
Merge branch 'master' into greasepencil-edit-curve
Diffstat (limited to 'release/scripts/startup/bl_ui')
5 files changed, 40 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 696883d965c..5b8d97488f9 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1528,7 +1528,7 @@ class SEQUENCER_PT_time(SequencerButtonsPanel, Panel): split.alignment = 'RIGHT' split.label(text="End") split = split.split(factor=0.8 + max_factor, align=True) - split.label(text="{:>14}".format(smpte_from_frame(frame_final_end))) + split.label(text="%14s" % smpte_from_frame(frame_final_end)) split.alignment = 'RIGHT' split.label(text=str(frame_final_end) + " ") @@ -1572,7 +1572,7 @@ class SEQUENCER_PT_time(SequencerButtonsPanel, Panel): split.label(text="Playhead") split = split.split(factor=0.8 + max_factor, align=True) frame_display = frame_current - frame_final_start - split.label(text="{:>14}".format(smpte_from_frame(frame_display))) + split.label(text="%14s" % smpte_from_frame(frame_display)) split.alignment = 'RIGHT' split.label(text=str(frame_display) + " ") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index e0651dcac2b..f052e42766c 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -450,7 +450,7 @@ class ToolSelectPanelHelper: @classmethod def _km_action_simple(cls, kc_default, kc, context_descr, label, keymap_fn): - km_idname = f"{cls.keymap_prefix:s} {context_descr:s}, {label:s}" + km_idname = "%s %s, %s" % (cls.keymap_prefix, context_descr, label) km = kc.keymaps.get(km_idname) km_kwargs = dict(space_type=cls.bl_space_type, region_type='WINDOW', tool=True) if km is None: diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 2605cf1e1b9..d52cc6a6dad 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -124,12 +124,12 @@ class _defs_view3d_generic: kmi_remove = None return tip_( "Measure distance and angles.\n" - "\u2022 {} anywhere for new measurement.\n" + "\u2022 %s anywhere for new measurement.\n" "\u2022 Drag ruler segment to measure an angle.\n" - "\u2022 {} to remove the active ruler.\n" + "\u2022 %s to remove the active ruler.\n" "\u2022 Ctrl while dragging to snap.\n" "\u2022 Shift while dragging to measure surface thickness" - ).format( + ) % ( kmi_to_string_or_none(kmi_add), kmi_to_string_or_none(kmi_remove), ) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 42ae00203f3..c1502165e44 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -45,7 +45,7 @@ class USERPREF_HT_header(Header): # Show '*' to let users know the preferences have been modified. layout.operator( "wm.save_userpref", - text="Save Preferences{:s}".format(" *" if prefs.is_dirty else ""), + text="Save Preferences" + (" *" if prefs.is_dirty else ""), ) def draw(self, context): @@ -1903,8 +1903,10 @@ class USERPREF_PT_addons(AddOnPanel, Panel): "wm.url_open", text="Report a Bug", icon='URL', ).url = info["tracker_url"] elif not user_addon: - addon_info = ("Name: {} {}\nAuthor: {}\n").format( - info["name"], info["version"], info["author"]) + addon_info = ( + "Name: %s %s\n" + "Author: %s\n" + ) % (info["name"], str(info["version"]), info["author"]) props = sub.operator( "wm.url_open_preset", text="Report a Bug", icon='URL', ) @@ -1987,7 +1989,7 @@ class StudioLightPanelMixin: for studio_light in lights: self.draw_studio_light(flow, studio_light) else: - layout.label(text="No custom {} configured".format(self.bl_label)) + layout.label(text="No custom %s configured" % self.bl_label) def draw_studio_light(self, layout, studio_light): box = layout.box() @@ -2132,19 +2134,39 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel): """ -class USERPREF_PT_experimental_system(ExperimentalPanel, Panel): - bl_label = "System" +class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel): + bl_label = "New Features" def draw(self, context): self._draw_items( context, ( - ({"property": "use_undo_legacy"}, "T60695"), ({"property": "use_new_particle_system"}, "T73324"), + ), + ) + + +class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel): + bl_label = "Prototypes" + + def draw(self, context): + self._draw_items( + context, ( ({"property": "use_new_hair_type"}, "T68981"), ), ) +class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel): + bl_label = "Debugging" + + def draw(self, context): + self._draw_items( + context, ( + ({"property": "use_undo_legacy"}, "T60695"), + ), + ) + + # ----------------------------------------------------------------------------- # Class Registration @@ -2235,7 +2257,9 @@ classes = ( # Popovers. USERPREF_PT_ndof_settings, - USERPREF_PT_experimental_system, + USERPREF_PT_experimental_new_features, + USERPREF_PT_experimental_prototypes, + USERPREF_PT_experimental_debugging, # Add dynamically generated editor theme panels last, # so they show up last in the theme section. diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index c8c8ab2ebb7..25e87a39bc1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5642,8 +5642,8 @@ class VIEW3D_PT_object_type_visibility(Panel): elif attr == "pointcloud" and not hasattr(bpy.data, "pointclouds"): continue - attr_v = "show_object_viewport_" f"{attr:s}" - attr_s = "show_object_select_" f"{attr:s}" + attr_v = "show_object_viewport_" + attr + attr_s = "show_object_select_" + attr icon_v = 'HIDE_OFF' if getattr(view, attr_v) else 'HIDE_ON' icon_s = 'RESTRICT_SELECT_OFF' if getattr(view, attr_s) else 'RESTRICT_SELECT_ON' |