// =========================================================================== // 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. // =========================================================================== // // SYNOPSIS // This proc is called by a scriptJob when the selection // changes. If the dynAttr window is open, it updates it // to reflect the new selection. If the window is not open, // it kills the scriptJob to prevent unnecesary background // processing. // global proc dynUpdateAttrWin() { global int $gDynAddAttrUpdateJob; string $win = "AddAttrWin"; if ( `window -exists $win` ){ if ( `window -q -visible $win` ){ dynAddAttrWin( {} ); } else if ($gDynAddAttrUpdateJob != 0) { evalDeferred("scriptJob -force -kill " + $gDynAddAttrUpdateJob); $gDynAddAttrUpdateJob = 0; } } }