Go to: Synopsis. Return value. Python examples.

Synopsis

reloadImage( string string )

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

reloadImage is undoable, NOT queryable, and NOT editable.

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.

Return value

booleanTrue if image is successfully loaded, false otherwise.

Python examples

import maya.cmds as cmds

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