Gizmos do not appear when editing normals via the rotate or point to target functions #65147

Open
opened 2019-05-26 15:08:17 +02:00 by Hidalgo Lakhdi · 17 comments

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: Intel(R) HD Graphics 620 Intel 4.5.0 - Build 24.20.100.6292

Blender Version
Broken: version: 2.80 (sub 72), branch: master, commit date: 2019-05-25 23:18, hash: f18373a9ab
Worked: (optional)

Short description of error
When editing normals using the "rotate" or "point to target" options in the Alt-N normal menu, no gizmo appears to control these functions using the mouse. This behavior isn't consistent with the behavior shown in this video .

Exact steps for others to reproduce the error

Open new "General" file

(Optional: Enable normal visualization gizmos)

Select cube and go into edit mode

Select a face and open the Alt-N normal editing menu

Choose the "rotate" or "look at target" options

  • Gizmo for mouse does not appear
**System Information** Operating system: Windows-10-10.0.17763 64 Bits Graphics card: Intel(R) HD Graphics 620 Intel 4.5.0 - Build 24.20.100.6292 **Blender Version** Broken: version: 2.80 (sub 72), branch: master, commit date: 2019-05-25 23:18, hash: `f18373a9ab` Worked: (optional) **Short description of error** When editing normals using the "rotate" or "point to target" options in the Alt-N normal menu, no gizmo appears to control these functions using the mouse. This behavior isn't consistent with the behavior [shown in this video ](https://youtu.be/Rqsgrg_SVME?t=123). **Exact steps for others to reproduce the error** # Open new "General" file # (Optional: Enable normal visualization gizmos) # Select cube and go into edit mode # Select a face and open the Alt-N normal editing menu # Choose the "rotate" or "look at target" options - Gizmo for mouse does not appear
Author

Added subscriber: @frarf

Added subscriber: @frarf

Added subscribers: @howardt, @WilliamReynish

Added subscribers: @howardt, @WilliamReynish
Howard Trickey was assigned by William Reynish 2019-05-26 21:15:42 +02:00

I can confirm this. What you mean by 'gizmo' isn't what we internally call a gizmo though. It's the cursor + connection line that is missing in this case.

@howardt Perhaps you could take a look?

I can confirm this. What you mean by 'gizmo' isn't what we internally call a gizmo though. It's the cursor + connection line that is missing in this case. @howardt Perhaps you could take a look?
Author

Oh, sorry. I'm not familiar with all the Blender lingo quite yet.
Thank you for forwarding this! I really appreciate it, normal tools are important.

Oh, sorry. I'm not familiar with all the Blender lingo quite yet. Thank you for forwarding this! I really appreciate it, normal tools are important.
Member

Yes, it is not just that the UI doesn't show the connection lines, but that in fact the Rotate option of the menu doesn't work at all -- I guess the modal operation finishes immediately. As a workaround until I fix this, you can use the r shortcut followed by n to rotate the selected normal(s). Or it also works to do an F3 search for Rotate Normals and select that.
But i will work on trying to get the menu method to work. Thanks for the report.

Yes, it is not just that the UI doesn't show the connection lines, but that in fact the Rotate option of the menu doesn't work at all -- I guess the modal operation finishes immediately. As a workaround until I fix this, you can use the r shortcut followed by n to rotate the selected normal(s). Or it also works to do an F3 search for Rotate Normals and select that. But i will work on trying to get the menu method to work. Thanks for the report.
Author

Thank you! Yes, that works, that's more than enough for me.
Anytime, glad to help.

Thank you! Yes, that works, that's more than enough for me. Anytime, glad to help.
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

Campbell: When the "Rotate Normals" menu is selected from the Mesh > Normals submenu, it gets a context that has INVOKE in it whereas if it is selected via the same submenu when it pops up after hitting Alt-n (to which it is mapped), it gets a context that has EXEC in it.
.
This means that the operator is INVOKED when you select it from the header menu, but EXECED when you select it from the shortcutted popup menu. Is this intended? It means that the modal operation doesn't happen when selected from the Alt-n menu, rendering this particular operation useless.

How should we fix this?

Campbell: When the "Rotate Normals" menu is selected from the Mesh > Normals submenu, it gets a context that has INVOKE in it whereas if it is selected via the same submenu when it pops up after hitting Alt-n (to which it is mapped), it gets a context that has EXEC in it. . This means that the operator is INVOKED when you select it from the header menu, but EXECED when you select it from the shortcutted popup menu. Is this intended? It means that the modal operation doesn't happen when selected from the Alt-n menu, rendering this particular operation useless. How should we fix this?

@howardt isn’t it just a matter of setting the operator context to invoke?

@howardt isn’t it just a matter of setting the operator context to invoke?
Member

Is that something settable in the keymap editor? Haven't looked, but will. About to get on a plane for a vacation...

Is that something settable in the keymap editor? Haven't looked, but will. About to get on a plane for a vacation...

This issue was referenced by b4071c56ce

This issue was referenced by b4071c56cedf4c55d1fb3e6847e63bdbd172f1dd

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Member

Campbell, your fix of putting

 layout.operator_context = ‘INVOKE_DEFAULT'

in front of the rotate normals menu entry appears not to work (or at least, work well) when the menu is entered via the Mesh > Normals > Rotate Normals entry.
What happens is that the dotted line that joins the mouse to the cursor is not shown, and the mouse movement causes very limited change in the rotation angle, such that it is hard to even notice that the normals are being rotated.

I tried to debug, and found that with your change, the code invoked that way now gets to wm_operator_call_internal() with a context argument of 0 (INVOKE_DEFAULT) rather than 1 (WM_OP_INVOKE_REGION_WIN) which it did when invoked that way without the assignment of INVOKE_DEFAULT in the menu definition code. This has the effect, in that function, of not doing all of the code that figures out which region to change to with CTX_wm_region_set. So the region with your fix is header instead of the main window (at least I think that from where ymin and ymax are in the region rectangle). This is likely why the mouse-drawing and measurement related code later in the normal rotation transform code behaves strangely.

Sorry to throw this back to you, but I don't know how to fix. I tried setting layout.context to WM_OP_INVOKE_REGION in the menu code, but that didn't work at all -- the menus stopped getting drawn at the rotate-normals entry.

Campbell, your fix of putting ``` layout.operator_context = ‘INVOKE_DEFAULT' ``` in front of the rotate normals menu entry appears not to work (or at least, work well) when the menu is entered via the Mesh > Normals > Rotate Normals entry. What happens is that the dotted line that joins the mouse to the cursor is not shown, and the mouse movement causes very limited change in the rotation angle, such that it is hard to even notice that the normals are being rotated. I tried to debug, and found that with your change, the code invoked that way now gets to wm_operator_call_internal() with a context argument of 0 (INVOKE_DEFAULT) rather than 1 (WM_OP_INVOKE_REGION_WIN) which it did when invoked that way without the assignment of INVOKE_DEFAULT in the menu definition code. This has the effect, in that function, of not doing all of the code that figures out which region to change to with CTX_wm_region_set. So the region with your fix is header instead of the main window (at least I think that from where ymin and ymax are in the region rectangle). This is likely why the mouse-drawing and measurement related code later in the normal rotation transform code behaves strangely. Sorry to throw this back to you, but I don't know how to fix. I tried setting layout.context to WM_OP_INVOKE_REGION in the menu code, but that didn't work at all -- the menus stopped getting drawn at the rotate-normals entry.
Howard Trickey was unassigned by Campbell Barton 2019-06-11 12:58:05 +02:00
Campbell Barton self-assigned this 2019-06-11 12:58:05 +02:00

Interesting, accessing any transform from the header has this problem, it applies to 2.7x too.

While it should be fixed it's not a new problem.


Looked into this, the screens active region needs to be changed from the header to the window region, or the cursor could use a region other than the screens active region.

Interesting, accessing *any* transform from the header has this problem, it applies to 2.7x too. While it should be fixed it's not a new problem. ---- Looked into this, the screens active region needs to be changed from the header to the window region, or the cursor could use a region other than the screens active region.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

regarding the usage from the header, there was eae9b86297

regarding the usage from the header, there was eae9b86297
Campbell Barton was unassigned by Dalai Felinto 2019-12-23 16:34:16 +01:00
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:29:52 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#65147
No description provided.