Post #5462: Thanks for checking the error!
📋 Metadata
- Author: Pluglug
- Date: 2025-03-22 15:43:22
- Type:
answer - Quality Score: 8/10
- Reply to: post_05461
- Replies (2): post_05464, post_05465
🏷️ Tags
blender-compatibility advanced solved
⚙️ Related PME Features
- Modal Editor
💬 Content
Thanks for checking the error!
You’re absolutely right — adding move_flag as a class variable does get rid of the error.
That said, just a small note: since this class inherits from CTU.HeadModalHandler, it’s worth taking a look at that implementation too.
In CTU.HeadModalHandler, move_flag is initialized as an instance variable inside __init__(), so at first glance it seems like everything should be fine.
Which likely means something has changed in Blender 4.4.
In cases like this, it’s a good idea to check the release notes.
Release Notes - Blender Developer Documentation
If you look under 4.4 > Python API, there’s a section called Breaking Changes — and sure enough, it outlines a new rule for how __init__ should be used to safely initialize subclasses.
Breaking Changes - Blender Developer Documentation
So yes, we do need to update the code to follow the new rules.
But in this case, instead of relying on __init__(), it might be more future-proof to move the initialization into execute() instead.
I haven’t had a chance to try this in 4.4 yet, so if you’re able to test it, let me know if it works!
❤️ 3 likes
image813×1153 101 KB