pymel.core.system.reloadImage

reloadImage(*args, **kwargs)

This command reloads an xpm image from disk. This can be used when the file has changed on disk and needs to be reloaded. The first string argument is the file name of the .xpm file. The second string argument is the name of a control using the specified pixmap.

Derived from mel command maya.cmds.reloadImage

Example:

import pymel.core as pm

pm.reloadImage( 'image.xpm', 'iconTextButtonName' )
pm.reloadImage( 'image', 'shelfButtonName' )
pm.reloadImage( '~/bitmaps/maya/image.xpm', 'toolButtonName' )