📋 Metadata
- Author: youthatninja
- Date: 2020-08-22 20:39:58
- Type:
question - Reply to: post_03531
💬 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 