Redrawing the layout (?) from menu stops accepting key pressing (?) #119897

Open
opened 2024-03-26 01:49:12 +01:00 by ugorek · 3 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-03-16 19:16, hash: 6768ded89586
Worked: ?

Short description of error
Quickly toggling the enum prop with Ctrl MMB, which is located above the node editor, can momentarily "pass itself" to the node editor.

2024-03-26_07.36.17.gif

Exact steps for others to reproduce the error

  1. Run the script below once.
  2. Press D in a geometry node region.
    • This is to get an enumeration property, the layout of which will be located above the node editor)
  3. Hold Ctrl and start quickly scrolling the mouse wheel over this property.
    • If you scroll the mouse wheel slowly, then it will always change the enum property (which is expected), only when you scroll rather quickly, the first mouse wheel event would change the enum property, and subsequent wheel event will mostly move the node region (but for maybe around 8 wheel events, the enum UI would still respond once and change the enum value).
import bpy

class Op(bpy.types.Operator):
    bl_idname = "aa.op"
    bl_label = "Operator"
    def execute(self, context):
        return {'FINISHED'}
    def draw(self, context):
        tree = context.space_data.edit_tree
        self.layout.label(text='self.layout.label(text="")')
        self.layout.prop(tree.interface.items_tree[0],'socket_type', text="")
        self.layout.scale_y = 1.25
    def invoke(self, context, event):
        return context.window_manager.invoke_popup(self, width=196)

bpy.utils.register_class(Op)

kmANe = bpy.context.window_manager.keyconfigs.addon.keymaps.new(name="Node Editor", space_type='NODE_EDITOR')
kmANe.keymap_items.new(idname=Op.bl_idname, type='D', value='PRESS')
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33 **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-03-16 19:16, hash: `6768ded89586` Worked: ? **Short description of error** Quickly toggling the enum prop with Ctrl MMB, which is located above the node editor, can momentarily "pass itself" to the node editor. ![2024-03-26_07.36.17.gif](/attachments/be420e31-3536-4014-9381-d5134f6a4ecc) **Exact steps for others to reproduce the error** 1. Run the script below once. 2. Press `D` in a geometry node region. - This is to get an enumeration property, the layout of which will be located above the node editor) 3. Hold Ctrl and start quickly scrolling the mouse wheel over this property. - If you scroll the mouse wheel slowly, then it will always change the enum property (which is expected), only when you scroll rather quickly, the first mouse wheel event would change the enum property, and subsequent wheel event will mostly move the node region (but for maybe around 8 wheel events, the enum UI would still respond once and change the enum value). ``` import bpy class Op(bpy.types.Operator): bl_idname = "aa.op" bl_label = "Operator" def execute(self, context): return {'FINISHED'} def draw(self, context): tree = context.space_data.edit_tree self.layout.label(text='self.layout.label(text="")') self.layout.prop(tree.interface.items_tree[0],'socket_type', text="") self.layout.scale_y = 1.25 def invoke(self, context, event): return context.window_manager.invoke_popup(self, width=196) bpy.utils.register_class(Op) kmANe = bpy.context.window_manager.keyconfigs.addon.keymaps.new(name="Node Editor", space_type='NODE_EDITOR') kmANe.keymap_items.new(idname=Op.bl_idname, type='D', value='PRESS') ```
ugorek added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-03-26 01:49:12 +01:00
Member

stops accepting key pressing

Hi, thanks for the report. Didn't quite understand this. Can you expand on it? I'm able to call the python operator with the new keymap and the selected item from the enum list is also updating with ctrl MMB.

> stops accepting key pressing Hi, thanks for the report. Didn't quite understand this. Can you expand on it? I'm able to call the python operator with the new keymap and the selected item from the enum list is also updating with ctrl MMB.
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-03-26 05:26:05 +01:00
Author

@PratikPB2123 The problem is that I can scroll the node editor "screen space" even if the cursor is over a property in the layout. To do this, you need to rotate the mouse wheel very quickly. Isn't it noticeable in the gif?
One-time switching of the enumeration occurs correctly, but switching it quickly leads to movement in the node editor.

@PratikPB2123 The problem is that I can scroll the node editor "screen space" even if the cursor is over a property in the layout. To do this, you need to rotate the mouse wheel very quickly. Isn't it noticeable in the gif? One-time switching of the enumeration occurs correctly, but switching it quickly leads to movement in the node editor.
Member

I can reproduce, yes. It seems to be that the focus didn't hold onto the enum dropdown. Updated the reproduction steps in the post.

I can reproduce, yes. It seems to be that the focus didn't hold onto the enum dropdown. Updated the reproduction steps in the post.
YimingWu added
Module
User Interface
Status
Confirmed
and removed
Status
Needs Information from User
labels 2024-03-27 06:44:42 +01:00
ugorek changed title from Redrawing the layout (?) from menu stops accepting key pressing (?). to Redrawing the layout (?) from menu stops accepting key pressing (?) 2024-03-27 13:01:56 +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
3 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#119897
No description provided.