refresh function when selecting material in Material Editor or object in scene
How to listen navigation in material editor or object selection so, that I could call refresh function in a script?
I know that:
to_print = (medit.GetActiveMtlSlot() as string)
but this is not working any time when you navigate! And I don't want to make an infinite loop to see if GetActiveMtlSlot() changes!