Blender 3.6.7LTS
When I trigger play animation I would like a script to change the background to a reddish colour To indicate that the animation is playing and when I stop the animation player it defaults to it's original colour.
I tried to chat GTP this, but to no avail.
My basic logic was
Deafult = bpy.context.space_data.shading.background_type = 'THEME'
When animation is playing change bpy.context.space_data.shading.background_type = 'VIEWPORT' and make it's colour bpy.context.space_data.shading.background_color = (0.0169089, 0.00796443, 0.00961567)
When animation player has stopped, revert back to default.
Chat GTP can do the first 50%, it's fails knowing when the animation player has stopped, or my instructions are terrible.
I want this because sometimes the animation is playing in the background by mistake and it'll crunch my computer if I'm in weight mapping etc.