I wrote s simple script that lets me manage Blender's geometry smoothing a little easier and faster but I'm struggling with something. Since I'm fiddling with the smoothing, I'd like to "Copy" Blenders Auto Smooth checkbox and Smooth Angle slider for a faster and more convenient workflow.
I tried a few things and nothing worked. I created a Custom BoolProperty for the checkbox but I can't get it to control the setting. This is the Custom property:
class AutoSmoothData(bpy.types.PropertyGroup): auto_smooth_toggle: bpy.props.BoolProperty( name="Auto Smooth", description="Toggle Auto Smooth", default=bpy.context.object.data.use_auto_smooth )
After this, I just put it on the UI, but I have no idea where do I have to "tell" it to change the actual built-in Auto Smooth setting.
I also have this function:
def auto_smooth(): if bpy.context.scene.smooth_prop.auto_smooth_toggle == True: bpy.context.object.data.use_auto_smooth = True else: bpy.context.object.data.use_auto_smooth = False
But as I said, I don't know where to execute it.