📋 Metadata

💬 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 :woozy_face:

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 :slight_smile:


🔗 View on Blender Artists