Go to: Synopsis. Return value. Keywords. Python examples.
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
swatchRefresh is NOT undoable, NOT queryable, and NOT editable.The swatchRefresh command causes image source node swatches to be refreshed on screen. The purpose of this command is to provide a mechanism to trigger a swatch refresh in cases that are not subject to dirty propagation in the dependency graph. This command only works with imageSource-derived node types. Invoking this command with no arguments will cause all imageSource swatches to be refreshed.
|boolean||true if all arguments are valid image source nodes and the operation succeded.|
import maya.cmds as cmds # Refresh the swatch for the layer1 node cmds.swatchRefresh('layer1')