Pressing a key over the pie operator results in a double execution. #115155

Open
opened 2023-11-19 22:37:09 +01:00 by ugorek · 1 comment

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 536.23

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-11-18 21:46, hash: 9eba3902c904
Worked: never!

Short description of error
Pressing a key over the pie operator results in a double execution:
2023-11-20_04.28.27.gif

import bpy

class Op(bpy.types.Operator):
    bl_idname = 'text.op'
    bl_label = "Op"
    txt: bpy.props.StringProperty()
    def execute(self, context):
        print(self.txt)
        tb = context.space_data.text
        tb.write("")
        tb.write("\n#-"+self.txt) #<-- here
        return {'FINISHED'}
class Pie(bpy.types.Menu):
    bl_idname = 'AA_MT_pie'
    bl_label = "Bug report"
    def draw(self, context):
        pie = self.layout.menu_pie()
        pie.scale_x = 1.5
        pie.scale_y = 1.5
        L = lambda pie: pie#.row()
        L(pie).operator(Op.bl_idname, text="a. this first option with _a_", icon='X').txt = "AAaa!"
        L(pie).operator(Op.bl_idname, text="b. mouse pointer here and press 'A'", icon='RESTRICT_SELECT_OFF').txt = "BBbb!"

if __name__=="__main__":
    print("===Start===")
    bpy.utils.register_class(Op)
    bpy.utils.register_class(Pie)
    bpy.ops.wm.call_menu_pie(name=Pie.bl_idname)

Exact steps for others to reproduce the error
Copy script and run.

**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 536.23 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-11-18 21:46, hash: `9eba3902c904` Worked: never! **Short description of error** Pressing a key over the pie operator results in a double execution: ![2023-11-20_04.28.27.gif](/attachments/fa9b19a6-384c-42e9-9449-4c55ffe9c703) ```python import bpy class Op(bpy.types.Operator): bl_idname = 'text.op' bl_label = "Op" txt: bpy.props.StringProperty() def execute(self, context): print(self.txt) tb = context.space_data.text tb.write("") tb.write("\n#-"+self.txt) #<-- here return {'FINISHED'} class Pie(bpy.types.Menu): bl_idname = 'AA_MT_pie' bl_label = "Bug report" def draw(self, context): pie = self.layout.menu_pie() pie.scale_x = 1.5 pie.scale_y = 1.5 L = lambda pie: pie#.row() L(pie).operator(Op.bl_idname, text="a. this first option with _a_", icon='X').txt = "AAaa!" L(pie).operator(Op.bl_idname, text="b. mouse pointer here and press 'A'", icon='RESTRICT_SELECT_OFF').txt = "BBbb!" if __name__=="__main__": print("===Start===") bpy.utils.register_class(Op) bpy.utils.register_class(Pie) bpy.ops.wm.call_menu_pie(name=Pie.bl_idname) ``` **Exact steps for others to reproduce the error** Copy script and run.
ugorek added the
Severity
Normal
Type
Report
Status
Needs Triage
labels 2023-11-19 22:37:10 +01:00
Member

Thanks for the report. Can confirm. Script look correct to me.

Thanks for the report. Can confirm. Script look correct to me.
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 13:06:18 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#115155
No description provided.