I want to make it VERY obvious when auto keying is turned on in Blender. I want to write an add-on where, if auto keying is turned on, Blender's theme turns to Blender Light. Otherwise, Blender's theme is Blender Dark.
The core of the add-on is basically this:
if bpy.context.scene.tool_settings.use_keyframe_insert_auto == True:
bpy.ops.script.execute_preset(menu_idname="USERPREF_MT_interface_theme_presets", filepath="C:\\Programs\\blender\\2.81\\scripts\\presets\\interface_theme\\blender_light.xml")
else:
bpy.ops.script.execute_preset(menu_idname="USERPREF_MT_interface_theme_presets", filepath="C:\\Programs\\blender\\2.81\\scripts\\presets\\interface_theme\\blender_dark.xml")
Is it possible -- via an add-on -- to intercept when use_keyframe_insert_auto
changes and then have this code execute? If so, how?
If that's not possible, what is the recommended way of handling this?