Post #1565: I don’t know if there’s a specific problem in one of my personal files but I alw
📋 Metadata
- Author: Edtion
- Date: 2018-09-17 21:16:00
- Type:
bug_report - Quality Score: 9/10
- Replies (1): post_01566
🏷️ Tags
hotkeys conflicts advanced solved
⚙️ Related PME Features
- Pie Menu Editor
- Stack Key Editor
- Hotkey Configuration
💬 Content
I don’t know if there’s a specific problem in one of my personal files but I always use the daily builds (master).
I updated it today (as well is this addon) and I have an error (only shows in console).
line 179-180, panel_utils.py
tp = getattr(bpy.types, tp_name, None)
if tp == panel_tp or not issubclass(tp, panel_tp) or \
unneccessary text
This works but the problem is the None part. You didn’t setup the rest of the code to work for if the result actually is None.
I have a blank property in bpy.types (idk how) , and so tp returns None, then the rest of the code tries to use None like it exists.
For anyone curious, the result of this error is that you can’t set a context for any menu. So for example, a panel in the Properties window will either show in every page (Render/Material/Scene/Physics/etc), or none when it’s disabled.
quick fix to get it to work correctly:
tp = getattr(bpy.types, tp_name, None)
if not tp or tp == panel_tp or not issubclass(tp, panel_tp) or \
edit 1:
There’s also another problem, where hold-key commands don’t work correctly.
I have a menu to open when holding ctrl+C, and use the copy-attributes addon for pressing ctrl+C.
The PME hold-ctrl+C works but it does not run the regular ctrl+c press for the other addon.
edit 2:
fix for that as well:
line # 202-206 in operator_utils.py:
try:
ret = eval("bpy.ops.%s" % bl_idname)
ret.get_rna()
except:
ret = None
get_rna seems to be replaced, so:
try:
ret = eval("bpy.ops.%s" % bl_idname)
try: ret.get_rna()
except: ret.get_rna_type()
except:
ret = None