diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-12-21 18:52:05 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-12-21 18:52:05 +0300 |
commit | c48c4743bc49a15af4ff1770d330449a5f4505d5 (patch) | |
tree | c3087c0713ed3992a75457a6969c2e7fa9bcfe89 /mesh_snap_utilities_line | |
parent | 1f36b19604c4b62ac6acf47f93ad5863af2032de (diff) |
mesh_snap_utilities_line: finish operation when pressing Enter
Make the behavior look similar to the knife Tool.
Diffstat (limited to 'mesh_snap_utilities_line')
-rw-r--r-- | mesh_snap_utilities_line/ops_line.py | 8 |
1 files changed, 3 insertions, 5 deletions
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': |