// =========================================================================== // 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: 2000 // // Description: Attempts to reduce stamp popping by increasing sampleDensity // and avoiding near zero width stamps due to pressure mappings // This does work for brushes with tubes on. global proc popFix() { string $selected[] = getSelectedBrushes(); string $sel; for( $sel in $selected ) { if( getAttr ($sel + ".tubes") != 0 ) { warning( (uiRes("m_popFix.kNoTubesOn"))); return; } } $selected = `ls -sl -dag -type stroke`; if( size( $selected ) <= 0 ) { warning( (uiRes("m_popFix.kNoStrokesSelected"))); return; } for( $sel in $selected ) { if( getAttr ($sel + ".pressureMap1") == 2 && getAttr ($sel + ".pressureMin1") < 0.1 ) { setAttr ($sel + ".pressureMin1") 0.1; } setAttr ($sel + ".sampleDensity") 10; } }