UI: Add tooltip for Poly Build tool #120792

Merged
Brecht Van Lommel merged 1 commits from Bartosz-Kosiorek/blender:polybuild into main 2024-04-22 12:28:01 +02:00
1 changed files with 21 additions and 0 deletions

View File

@ -767,8 +767,29 @@ class _defs_edit_mesh:
props = tool.operator_properties("mesh.polybuild_face_at_cursor_move")
props_macro = props.MESH_OT_polybuild_face_at_cursor
layout.prop(props_macro, "create_quads")
def description(_context, _item, km):
if km is not None:
kmi_add = km.keymap_items.find_from_operator("mesh.polybuild_face_at_cursor_move")
kmi_extrude = km.keymap_items.find_from_operator("mesh.polybuild_extrude_at_cursor_move")
kmi_delete = km.keymap_items.find_from_operator("mesh.polybuild_delete_at_cursor")
else:
kmi_add = None
kmi_extrude = None
kmi_delete = None
return tip_(
"Use multiple operators in an interactive way to add, delete, or move geometry.\n"
Bartosz-Kosiorek marked this conversation as resolved Outdated
  • many -> multiple
  • Remove "built" which is grammatically wrong and doesn't really have meaning here anyway
- `many` -> `multiple` - Remove "built" which is grammatically wrong and doesn't really have meaning here anyway
"\u2022 %s - Add geometry by moving the cursor close to an element.\n"
"\u2022 %s - Extrude edges by moving the cursor.\n"
Bartosz-Kosiorek marked this conversation as resolved Outdated

at cursor move doesn't make sense. It could be "on" but that sounds overly technical. Or maybe "Extrude edges by moving the cursor"

`at cursor move` doesn't make sense. It could be "on" but that sounds overly technical. Or maybe "Extrude edges by moving the cursor"

thanks, changed.

thanks, changed.
"\u2022 %s - Delete mesh element"
) % (
kmi_to_string_or_none(kmi_add),
kmi_to_string_or_none(kmi_extrude),
kmi_to_string_or_none(kmi_delete),
)
return dict(
idname="builtin.poly_build",
description=description,
label="Poly Build",
icon="ops.mesh.polybuild_hover",
widget="VIEW3D_GGT_mesh_preselect_elem",