Post #3533: This is what iām talking about
š Metadata
- Author: youthatninja
- Date: 2020-08-22 20:39:58
- Type:
question - Quality Score: 6/10
- Reply to: post_03531
š·ļø Tags
pie-menu hotkeys intermediate solved
āļø Related PME Features
- Python Scripting
- Pie Menu Editor
- Hotkey Configuration
š¬ Content
This is what iām talking about
import bpy
if bpy.context.object.type == 'MESH':
if bpy.context.object.data.polygons[0].use_smooth :
bpy.ops.object.shade_flat()
else:
bpy.ops.object.shade_smooth()
elif bpy.context.object.type == 'CURVE':
if bpy.context.object.data.splines[0].use_smooth :
bpy.ops.object.shade_flat()
else:
bpy.ops.object.shade_smooth()
I put it in external script, and now when i pressing hotkey for pie, the script executes and also there is no button 
https://i.gyazo.com/9558d2953c057a2063bbc2c712a3cf08.mp4
By the way Is it possible to write it as a command?
UPD: solved execute_script was in custom tab 