Post #5538: Sorry for the wait—great idea, I learned a lot too.
📋 Metadata
- Author: Pluglug
- Date: 2025-07-18 14:15:43
- Type:
answer - Quality Score: 9/10
- Reply to: post_05537
- Replies (1): post_05540
🏷️ Tags
popup-dialog macro panel-integration advanced solved
⚙️ Related PME Features
- Popup Dialog Editor
- Macro Editor
- Panel Group Editor
- Python Scripting
💬 Content
Sorry for the wait—great idea, I learned a lot too.
Pose-mode panels fail in Weight Paint because their poll() checks context.mode == 'POSE'.
Use context.temp_override() to fake Pose mode, then embed the panel in PME by giving it a dummy self that holds PME’s layout (L).
with C.temp_override(
object=C.pose_object,
active_object=C.pose_object,
selected_objects=[C.pose_object],
mode='POSE'): # Blender ≥ 4.4
dummy = type('DummyPanel', (), {})()
dummy.layout = L.box() # PME layout
bpy.types.VIEW3D_PT_tools_posemode_options.draw(dummy, C)
Works on my side—give it a try!
Panel drawing test for Pose mode in Weight Paint.json (1.4 KB)
image994×473 95.7 KB