blender python operator_menu_enum : crash #117679

Closed
opened 2024-01-30 21:10:38 +01:00 by James Tomkinson · 5 comments

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: 3.6.8

Short description of error
clicking on custom menu button with operator_menu_enum(...) causes crash

Exact steps for others to reproduce the error

  1. open the attached file and run the visible script
    a panel in Tool area appears named "Bone Animation Bulk Keys"
  2. click on "only changed dimension"
    blender crashes (EXCEPTION_ACCESS_VIOLATION)
**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: 3.6.8 **Short description of error** clicking on custom menu button with operator_menu_enum(...) causes crash **Exact steps for others to reproduce the error** 1. open the attached file and run the visible script a panel in Tool area appears named "Bone Animation Bulk Keys" 2. click on "only changed dimension" blender crashes (EXCEPTION_ACCESS_VIOLATION)
James Tomkinson added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-01-30 21:10:39 +01:00
Member

Can confirm, this was working in 3.6 LTS, will check which commit broke this

Can confirm, this was working in 3.6 LTS, will check which commit broke this
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-01-31 11:08:36 +01:00
Member

Crash caused by d6a6c3e1fc

This should be handled more gracefully, but may I ask why you even want to call operator_menu_enum with BoolProperty ?

Crash caused by d6a6c3e1fcc94473605f98d4b783168bb19f4f4d This should be handled more gracefully, but may I ask why you even want to call `operator_menu_enum` with `BoolProperty` ?
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2024-01-31 12:47:48 +01:00

Crash caused by d6a6c3e1fc

This should be handled more gracefully, but may I ask why you even want to call operator_menu_enum with BoolProperty ?

I'm probably just fishing around as there's not useful documentation or example how to set a BoolProperty through a menu item item (want a checkbox!) either in the API docs nor in blender.stackexchange, so this aging Java programmer is a tad lost.

> Crash caused by d6a6c3e1fcc94473605f98d4b783168bb19f4f4d > > This should be handled more gracefully, but may I ask why you even want to call `operator_menu_enum` with `BoolProperty` ? I'm probably just fishing around as there's not useful documentation or example how to set a BoolProperty through a menu item item (want a checkbox!) either in the API docs nor in blender.stackexchange, so this aging Java programmer is a tad lost.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-01-31 17:05:57 +01:00
Member

closed by accident?

closed by accident?
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2024-01-31 18:04:14 +01:00
Philipp Oeser added
Status
Confirmed
Module
User Interface
and removed
Status
Needs Triage
labels 2024-01-31 18:06:09 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-02-01 01:57:18 +01:00
Member

Crash caused by d6a6c3e1fc

This should be handled more gracefully, but may I ask why you even want to call operator_menu_enum with BoolProperty ?

I'm probably just fishing around as there's not useful documentation or example how to set a BoolProperty through a menu item item (want a checkbox!) either in the API docs nor in blender.stackexchange, so this aging Java programmer is a tad lost.

You can set the (bool) property:

If you want to see a checkbox, probably go with the fist one (the dialog)

> > Crash caused by d6a6c3e1fcc94473605f98d4b783168bb19f4f4d > > > > This should be handled more gracefully, but may I ask why you even want to call `operator_menu_enum` with `BoolProperty` ? > > I'm probably just fishing around as there's not useful documentation or example how to set a BoolProperty through a menu item item (want a checkbox!) either in the API docs nor in blender.stackexchange, so this aging Java programmer is a tad lost. You can set the (bool) property: - when executing via a popup dialog, see https://docs.blender.org/api/current/bpy.types.Operator.html#dialog-box - let the operator execute with the property set, something like `layout.operator("XXX").myProp = True`, so you could have two operator buttons (one with True, the other with False) If you want to see a checkbox, probably go with the fist one (the dialog)
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#117679
No description provided.