// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 1998 // global int $weHaveLoadedBefore = 0; global proc setPresetTmpIcon( string $iconName ) { global string $gTmpPaintPresetShelveButton; global int $weHaveLoadedBefore; if( `shelfButton -exists $gTmpPaintPresetShelveButton` ) { string $currIcon = `shelfButton -q -i1 $gTmpPaintPresetShelveButton`; int $needToReload = 0; if ($currIcon == $iconName) { $needToReload = 1; } shelfButton -e -i1 $iconName $gTmpPaintPresetShelveButton; if ($needToReload == 1 || $weHaveLoadedBefore == 1) { $weHaveLoadedBefore = 1; reloadImage $iconName $gTmpPaintPresetShelveButton; } } }