Is there a way get the list of selected materials that are selected on the Blender File's Outliner space and do something with that recently get list?
This method doesn't depend on what object is selected and/or which material is assgined to waht object.