Fix problem with Viewport Manipulator Gizmo #55420

Closed
opened 2018-06-09 20:18:08 +02:00 by Antonio Vazquez · 7 comments

As the Drawing/Sculpt/Weight mode capture any mouse input, the manipulator cannot be used.

Now, as the Draw operator is enabled when press LMB, the event of the operator is captured before gizmo.

We need

a) handle before gizmo events
or
b) a function to detect the cursor is over gizmo, something like ED_is_over_gizmo()

As the Drawing/Sculpt/Weight mode capture any mouse input, the manipulator cannot be used. Now, as the Draw operator is enabled when press LMB, the event of the operator is captured before gizmo. We need **a)** handle before gizmo events or **b)** a function to detect the cursor is over gizmo, something like ED_is_over_gizmo()
Author
Member
Added subscribers: @antoniov, @pablovazquez, @mendio, @pepe-school-land, @JoshuaLeung
Antonio Vazquez changed title from Fix problem with Viewport Manipulator to Fix problem with Viewport Manipulator Gizmo 2018-07-24 12:14:49 +02:00
Author
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Author
Member

@ideasman42 Could you take a look on this problem.

Now, as the Draw operator is enabled when press LMB, the event of the operator is captured before gizmo.

We need a) handle before gizmo events or b) a function to detect the cursor is over gizmo, something like ED_is_over_gizmo()

@ideasman42 Could you take a look on this problem. Now, as the Draw operator is enabled when press LMB, the event of the operator is captured before gizmo. We need **a)** handle before gizmo events or **b)** a function to detect the cursor is over gizmo, something like ED_is_over_gizmo()

Checking if an event is over a manipulator isn't cheap.

Also, by design, its not good to have to search to find if an event would be handled.
(manipulators might be under the cursor but de-activated too... - pass-through for eg).

So think it's best to find why this works for sculpt mode-mode, vertex-paint, curve-draw - all work correctly, but not grease pencil.

Checking if an event is over a manipulator isn't cheap. Also, by design, its not good to have to search to find if an event would be handled. (manipulators might be under the cursor but de-activated too... - pass-through for eg). So think it's best to find why this works for sculpt mode-mode, vertex-paint, curve-draw - all work correctly, but not grease pencil.
Author
Member

@ideasman42 Following your advices, I looked at the GPENCIL_OT_draw operator and what were the differences with sculpt paint. I have seen that both operators are very similar (I guess the initial implementation was a duplication of sculpt operator and modified). Both operators keymaps definition are very similar and I do not find apparent differences.

I have been doing debug and I have found the Invoke function of SCULPT_OT_brush_stroke operator is only called when the mouse is pressed in the viewport, but if you press over the gizmo, the invoke function is not called, so I assume the operator is not started.

I have checked the keymap and operator poll of sculpt operator and both return true over the gizmo, so there is something that does that events of gizmo are captured before than sculpt.

I looked in keymap registration too, but I'm unable to find where it's the place to set the gizmo capture events before sculpt operators to do the same for grease pencil operators.

Could you help me?

@JoshuaLeung Do you have any idea?

@ideasman42 Following your advices, I looked at the GPENCIL_OT_draw operator and what were the differences with sculpt paint. I have seen that both operators are very similar (I guess the initial implementation was a duplication of sculpt operator and modified). Both operators keymaps definition are very similar and I do not find apparent differences. I have been doing debug and I have found the Invoke function of SCULPT_OT_brush_stroke operator is only called when the mouse is pressed in the viewport, but if you press over the gizmo, the invoke function is not called, so I assume the operator is not started. I have checked the keymap and operator poll of sculpt operator and both return true over the gizmo, so there is something that does that events of gizmo are captured before than sculpt. I looked in keymap registration too, but I'm unable to find where it's the place to set the gizmo capture events before sculpt operators to do the same for grease pencil operators. Could you help me? @JoshuaLeung Do you have any idea?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Campbell Barton self-assigned this 2018-11-12 08:54:07 +01:00

Fixed df6530594f

Fixed df6530594f
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
2 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#55420
No description provided.