[Bf-blender-cvs] [eae9b862978] master: Fix crash using 'Mesh > Normals > Point to Target' from the header menu

Philipp Oeser noreply at git.blender.org
Thu Aug 22 16:04:35 CEST 2019


Commit: eae9b86297876d2172681e880fe2bcc8450a01ed
Author: Philipp Oeser
Date:   Thu Aug 22 14:53:44 2019 +0200
Branches: master
https://developer.blender.org/rBeae9b86297876d2172681e880fe2bcc8450a01ed

Fix crash using 'Mesh > Normals > Point to Target' from the header menu

This was working from Alt+N menu but was passing wrong ARegion
(alongside wrong mouse coords) to ED_view3d_win_to_3d_int when called
from the header menu.

Operator context INVOKE_REGION_WIN takes care of this.

This also fixes wrong behavior of 'Mesh > Normals > Rotate' when called
from the header menu.

part of T69019

Reviewers: billreynish, mont29

Maniphest Tasks: T69019

Differential Revision: https://developer.blender.org/D5555

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

M	release/scripts/startup/bl_ui/space_view3d.py

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 9b9623eaa60..6ef268f9321 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3802,7 +3802,7 @@ class VIEW3D_MT_edit_mesh_normals(Menu):
 
         layout.operator("mesh.set_normals_from_faces", text="Set From Faces")
 
-        layout.operator_context = 'INVOKE_DEFAULT'
+        layout.operator_context = 'INVOKE_REGION_WIN'
         layout.operator("transform.rotate_normal", text="Rotate...")
         layout.operator("mesh.point_normals", text="Point to Target...")
         layout.operator_context = 'EXEC_DEFAULT'



More information about the Bf-blender-cvs mailing list