missing event in modal() pass_through mode when a "builtin modal" is already attached #28970
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#28970
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%while executing the modal() using PASS_THROUGH, I also noticed that some events can disappear if they are catched by another (builtin) see attached file for test case.
example :
in image_editor, when an image is displayed, MOUSELEFT PRESS is catched by a py modal
the event is catched by the builtin "x y mouse and pixel values black bar" that appears at the bottom of WINDOW IMAGE_EDITOR.
but MOUSELEFT RELEASE can't be seen from the python modal
maybe a call to temporary freeze a builtin or any other modal execution, or an is_there_an_area_callback_here() call would be useful when in pass_through mode.
maybe it's related to the followinf undocumented items :
bl_options BLOCKING or GRAB_POINTER switches,
and operator call 'EXEC_..' and 'INVOKE...' arguments other than the '_DEFAULT' that seems to pass context childs directly to the op.%%%
Changed status to: 'Open'
%%%The problem is that when you start the modal operator, it's at the first in the list to get an event passed in. However when the color sample operator starts, it also starts a modal operator, and it's put in the list before your operator. It will swallow the key release event, and this is the right thing to do because other operators shouldn't act on that key release.
What you need is the ability to keep your operator as the first in the list to receive events, regardless of any other modal operators. There would be two ways to implement this, add another level above screen to run operators at, or add an option to keep the operator on the first place in the list.%%%
%%%it seems a way already exists, since the color sample modal() is disabled or at least not triggered, when the python modal() returns RUNNING_MODAL rather than PASS_THROUGH. any event is received by the python modal and everything is fine when running the modal this (exclusive) way.
the last 'running_modal' modal() started seems to be on 'the first place in the list.'
maybe in future, from a larger point of view I would need to know what is actually running as a callback in a given area, before to run my own ?
a test call from invoke() or a handler_add control ? considering the growing number of addons with their own modal BGL functions shipped, any existing modal instances, builtin or addon ones, should be available in the bpy one day.. in context ? maybe they already are, actually I don't find them and maybe I'm wrong.%%%
%%%Moved to todo list, the operator system simply was not designed to work this way, it would be useful to make it possible to have an operator that can capture all events no matter what other operator is executed, but it's not considered a bug.
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#Undo.2C_Redo_and_Operator_Context%%%
Changed status from 'Open' to: 'Archived'