Text3d: add select all operator

also add Edit menu for 3d text and move cut/copy/paste there.
This commit is contained in:
2013-12-29 23:43:19 +11:00
parent 1c8d1569da
commit 42aa19088e
5 changed files with 65 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ class VIEW3D_HT_header(Header):
sub.menu("VIEW3D_MT_select_paint_mask")
elif mesh.use_paint_mask_vertex and mode_string == 'PAINT_WEIGHT':
sub.menu("VIEW3D_MT_select_paint_mask_vertex")
elif mode_string not in {'EDIT_TEXT', 'SCULPT'}:
elif mode_string not in {'SCULPT'}:
sub.menu("VIEW3D_MT_select_%s" % mode_string.lower())
if mode_string == 'OBJECT':
@@ -714,6 +714,23 @@ class VIEW3D_MT_select_edit_surface(Menu):
layout.operator("curve.select_less")
class VIEW3D_MT_select_edit_text(Menu):
# intentional name mis-match
# select menu for 3d-text doesn't make sense
bl_label = "Edit"
def draw(self, context):
layout = self.layout
layout.operator("font.text_copy", text="Copy")
layout.operator("font.text_cut", text="Cut")
layout.operator("font.text_paste", text="Paste")
layout.separator()
layout.operator("font.select_all")
class VIEW3D_MT_select_edit_metaball(Menu):
bl_label = "Select"

View File

@@ -346,12 +346,6 @@ class VIEW3D_PT_tools_textedit(View3DPanel, Panel):
def draw(self, context):
layout = self.layout
col = layout.column(align=True)
col.label(text="Text Edit:")
col.operator("font.text_copy", text="Copy")
col.operator("font.text_cut", text="Cut")
col.operator("font.text_paste", text="Paste")
col = layout.column(align=True)
col.label(text="Set Case:")
col.operator("font.case_set", text="To Upper").case = 'UPPER'