Post #2394:
cy
π Metadata
- Author: roaoao
- Date: 2019-06-06 01:26:03
- Type:
answer - Quality Score: 8/10
- Reply to: post_02391
- Replies (1): post_02397
π·οΈ Tags
pie-menu python-scripting intermediate solved
βοΈ Related PME Features
- Custom Tab
- Pie Menu Editor
- Python Scripting
- Operator Integration
π¬ Content
cyso:
Can all functions be realized via the costum tab?
Not all but most of them.
cyso:
Tried the following:
L.operator(bpy.ops.mesh.primitive_monkey_add(), text=ββ, icon=βMESH_MONKEYβ)
Try this:
L.operator("mesh.primitive_monkey_add", text="", icon='MESH_MONKEY')
Your second command should also work but in this case you need to manually add execution context and undo flag (to be able to adjust operator settings):
L.operator("pme.exec", text="", icon='MESH_MONKEY').cmd = "bpy.ops.mesh.primitive_monkey_add('EXEC_DEFAULT', True)"