Post #5302: What is the new methot to create modal operators?
📋 Metadata
- Author: SoundDifferent
- Date: 2024-11-26 13:27:00
- Type:
bug_report - Quality Score: 7/10
🏷️ Tags
v1-18-7 modal compatibility advanced unsolved
⚙️ Related PME Features
- Modal Editor
- Overlay System
- Modal Operators
💬 Content
What is the new methot to create modal operators?
My previous modal operator which was working in 3.1 are no longer works in B4.2, PME is updated to latest version.
If i try it will immidiately throw an error:
Error
Python: Traceback (most recent call last):
File “C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\pie_menu_editor\operators.py”, line 988, in modal
self.update_overlay()
File “C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\pie_menu_editor\operators.py”, line 1214, in update_overlay
self.table = TablePainter(3, self.cells, self.pm.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\pie_menu_editor\overlay.py”, line 214, in init
self.header = Text(header) if header else None
^^^^^^^^^^^^
File “C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\pie_menu_editor\overlay.py”, line 163, in init
self.update(text)
File “C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\pie_menu_editor\overlay.py”, line 177, in update
blf.size(0, self.size, 72)
TypeError: blf.size() takes exactly 2 arguments (3 given)
I was able to find this solution: Pie Menu Editor 1.18.7 - #4862 by Pluglug
But unfortunately its only get rig of the error, but no modal operator are appear at all.
Modal operator:
scrscr2186×541 86.6 KB