[Bf-extensions-cvs] [c48c4743] master: mesh_snap_utilities_line: finish operation when pressing Enter

mano-wii noreply at git.blender.org
Fri Dec 21 18:01:56 CET 2018


Commit: c48c4743bc49a15af4ff1770d330449a5f4505d5
Author: mano-wii
Date:   Fri Dec 21 13:52:05 2018 -0200
Branches: master
https://developer.blender.org/rBAc48c4743bc49a15af4ff1770d330449a5f4505d5

mesh_snap_utilities_line: finish operation when pressing Enter

Make the behavior look similar to the knife Tool.

===================================================================

M	mesh_snap_utilities_line/ops_line.py

===================================================================

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':



More information about the Bf-extensions-cvs mailing list