diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-26 14:26:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-26 14:27:45 +0300 |
commit | d95dbd1f4f1ca270e1f1d53ef75be29e7a423c28 (patch) | |
tree | 0200df97013b13cd4a40226b9848c942623f8bc7 /release/scripts | |
parent | 92c9dbf343c0ac30e28fb660bd8ff9245f8ee345 (diff) |
UI: add kerning menu for 3D text editing
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e92490bcbdc..1dc5afe7c5e 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4329,6 +4329,23 @@ class VIEW3D_MT_edit_font(Menu): layout.operator("font.style_toggle", text="Toggle Underline", icon='UNDERLINE').style = 'UNDERLINE' layout.operator("font.style_toggle", text="Toggle Small Caps", icon='SMALL_CAPS').style = 'SMALL_CAPS' + layout.menu("VIEW3D_MT_edit_font_kerning") + + +class VIEW3D_MT_edit_font_kerning(Menu): + bl_label = "Kerning" + + def draw(self, context): + layout = self.layout + + ob = context.active_object + text = ob.data + kerning = text.edit_format.kerning + + layout.operator("font.change_spacing", text="Decrease Kerning").delta = -1 + layout.operator("font.change_spacing", text="Increase Kerning").delta = 1 + layout.operator("font.change_spacing", text="Reset Kerning").delta = -kerning + class VIEW3D_MT_edit_text_chars(Menu): bl_label = "Special Characters" @@ -7105,6 +7122,7 @@ classes = ( VIEW3D_MT_edit_curve_showhide, VIEW3D_MT_edit_surface, VIEW3D_MT_edit_font, + VIEW3D_MT_edit_font_kerning, VIEW3D_MT_edit_text_chars, VIEW3D_MT_edit_meta, VIEW3D_MT_edit_meta_showhide, |