From c48c4743bc49a15af4ff1770d330449a5f4505d5 Mon Sep 17 00:00:00 2001 From: mano-wii Date: Fri, 21 Dec 2018 13:52:05 -0200 Subject: mesh_snap_utilities_line: finish operation when pressing Enter Make the behavior look similar to the knife Tool. --- mesh_snap_utilities_line/ops_line.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mesh_snap_utilities_line') diff --git a/mesh_snap_utilities_line/ops_line.py b/mesh_snap_utilities_line/ops_line.py index 7b1cf157..9c5f38ed 100644 --- a/mesh_snap_utilities_line/ops_line.py +++ b/mesh_snap_utilities_line/ops_line.py @@ -410,8 +410,7 @@ class SnapUtilitiesLine(bpy.types.Operator): self.vector_constrain = None self.keyf8 = self.keyf8 is False - elif event.value == 'RELEASE': - if event.type in {'RET', 'NUMPAD_ENTER'}: + elif event.type in {'RET', 'NUMPAD_ENTER'}: if self.length_entered != "" and self.list_verts_co: try: text_value = bpy.utils.units.to_value(self.unit_system, 'LENGTH', self.length_entered) @@ -426,9 +425,8 @@ class SnapUtilitiesLine(bpy.types.Operator): except: # ValueError: self.report({'INFO'}, "Operation not supported yet") - if not self.wait_for_input: - self._exit(context) - return {'FINISHED'} + self._exit(context) + return {'FINISHED'} elif event.type in {'RIGHTMOUSE', 'ESC'}: if not self.wait_for_input or not is_making_lines or event.type == 'ESC': -- cgit v1.2.3