"view3d.view_roll" operator conflicts with Right Mouse button #102937

Closed
opened 2022-12-04 07:22:21 +01:00 by Blendy · 8 comments

System Information
Operating system: Windows 10
Graphics card:

Blender Version
Broken:
3.3, 3.5 alpha
Worked:
2.90
Short description of error
Because I use a ZBrush style navigation keymap. So I want to use right mouse button to rotate or roll viewport. If I bind view3d.view_roll to Shift+Right Mouse (press), the viewport can roll normally during right mouse button pressed, but once I release right mouse button, viewport angle resets back to previous status instantly. I'd already changed all right mouse menu keymaps when I tested it.
And it worked perfectly in Blender 2.90.

**System Information** Operating system: Windows 10 Graphics card: **Blender Version** Broken: 3.3, 3.5 alpha Worked: 2.90 **Short description of error** Because I use a ZBrush style navigation keymap. So I want to use right mouse button to rotate or roll viewport. If I bind view3d.view_roll to Shift+Right Mouse (press), the viewport can roll normally during right mouse button pressed, but once I release right mouse button, viewport angle resets back to previous status instantly. I'd already changed all right mouse menu keymaps when I tested it. And it worked perfectly in Blender 2.90.
Author

Added subscriber: @Rays-Lv

Added subscriber: @Rays-Lv
Member

Added subscribers: @lichtwerk, @OmarEmaraDev

Added subscribers: @lichtwerk, @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

This seems to be the operator getting canceled on right click key release. Which was introduced in 3.0 in 5d5504d8a4. So not sure if this is a bug.
Perhaps it should only cancel on pressed not releases? Perhaps you should handle this report @lichtwerk.

diff --git a/source/blender/editors/space_view3d/view3d_navigate_roll.c b/source/blender/editors/space_view3d/view3d_navigate_roll.c
index af93aa50238..cbc5a86f636 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_roll.c
+++ b/source/blender/editors/space_view3d/view3d_navigate_roll.c
@@ -106,7 +106,7 @@ static int viewroll_modal(bContext *C, wmOperator *op, const wmEvent *event)
         break;
     }
   }
-  else if (ELEM(event->type, EVT_ESCKEY, RIGHTMOUSE)) {
+  else if (ELEM(event->type, EVT_ESCKEY, RIGHTMOUSE) && event->val == KM_PRESS) {
     /* Note this does not remove auto-keys on locked cameras. */
     copy_qt_qt(vod->rv3d->viewquat, vod->init.quat);
     ED_view3d_camera_lock_sync(vod->depsgraph, vod->v3d, vod->rv3d);
This seems to be the operator getting canceled on right click key release. Which was introduced in 3.0 in 5d5504d8a4. So not sure if this is a bug. Perhaps it should only cancel on pressed not releases? Perhaps you should handle this report @lichtwerk. ``` diff --git a/source/blender/editors/space_view3d/view3d_navigate_roll.c b/source/blender/editors/space_view3d/view3d_navigate_roll.c index af93aa50238..cbc5a86f636 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_roll.c +++ b/source/blender/editors/space_view3d/view3d_navigate_roll.c @@ -106,7 +106,7 @@ static int viewroll_modal(bContext *C, wmOperator *op, const wmEvent *event) break; } } - else if (ELEM(event->type, EVT_ESCKEY, RIGHTMOUSE)) { + else if (ELEM(event->type, EVT_ESCKEY, RIGHTMOUSE) && event->val == KM_PRESS) { /* Note this does not remove auto-keys on locked cameras. */ copy_qt_qt(vod->rv3d->viewquat, vod->init.quat); ED_view3d_camera_lock_sync(vod->depsgraph, vod->v3d, vod->rv3d); ```
Member

The times I see ELEM(event->type, EVT_ESCKEY, RIGHTMOUSE) in context of cancelling, it is not used on KM_PRESS only.
So not sure what the "rules" are here.

Guess this is something the #user_interface module has to decide.

The times I see `ELEM(event->type, EVT_ESCKEY, RIGHTMOUSE)` in context of cancelling, it is not used on `KM_PRESS` only. So not sure what the "rules" are here. Guess this is something the #user_interface module has to decide.
Author

In #102937#1455002, @OmarEmaraDev wrote:
This seems to be the operator getting canceled on right click key release. Which was introduced in 3.0 in 5d5504d8a4. So not sure if this is a bug.
Perhaps it should only cancel on pressed not releases? Perhaps you should handle this report @lichtwerk.

I don't think view3d.view_roll should be canceled by right mouse, while right mouse can be remapped to roll viewport. And it's an unnecessary design. At least I'd never seen any scenario where I had to cancel rolling the viewport in practice.
If you want to make this design robust, you should add a customizable modal for view3d.view_roll like view3d.rotate with a "Cancel" event, so that user can set another key to cancel this operator.

> In #102937#1455002, @OmarEmaraDev wrote: > This seems to be the operator getting canceled on right click key release. Which was introduced in 3.0 in 5d5504d8a4. So not sure if this is a bug. > Perhaps it should only cancel on pressed not releases? Perhaps you should handle this report @lichtwerk. I don't think view3d.view_roll should be canceled by right mouse, while right mouse can be remapped to roll viewport. And it's an unnecessary design. At least I'd never seen any scenario where I had to cancel rolling the viewport in practice. If you want to make this design robust, you should add a customizable modal for view3d.view_roll like view3d.rotate with a "Cancel" event, so that user can set another key to cancel this operator.

This issue was referenced by 31943d1313

This issue was referenced by 31943d13134675abca4c1c35a86ffe2fe3f89af5

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Campbell Barton self-assigned this 2022-12-06 10:54:11 +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
5 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#102937
No description provided.