I'm trying to fix a quirk of one of my modules which show thumbs of all the active layers.
Currently when you remove a layer the old thumb stays there until a new layer is made and clip loaded to overwrite it. Please correct me if I'm wrong or miles off but so far I've got this from the below code (from the part where thumbnails are generated).
I think my problem is in the last line, as I want to to set that to blank/clear/black on a selected layer set to false/removed.
# Clear Layer thumb on removal of layer
if keyword == 'ctrl_layer_activated':
if param == False:
layname = "laymedia%d" % l
module.setAttribute(layname,'SHOW_MEDIA', media+1)
So it would mean that if ctrl_layer_activated = false on layer 3, clear the layer image on the media button called laymedia3 (or any layer 1->10.
Just looking at it I think I'm looking at the wrong thing. Any pointers would be great.