// =========================================================================== // 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. // =========================================================================== global proc setStrokePressure(int $pindex, int $mapping, float $min, float $max ) { global string $gCreatorWireCtx; string $whichCtx = $gCreatorWireCtx; if ($gCreatorWireCtx != "") { switch( $pindex ) { case 1: dynWireCtx -e -pm1 $mapping -ps1 $min -px1 $max $whichCtx; break; case 2: dynWireCtx -e -pm2 $mapping -ps2 $min -px2 $max $whichCtx; break; case 3: dynWireCtx -e -pm3 $mapping -ps3 $min -px3 $max $whichCtx; break; } } string $currContext = `currentCtx`; string $currentTool = `contextInfo -c $currContext`; if ( $currentTool == "art3dPaint" ) { switch( $pindex ) { case 1: art3dPaintCtx -e -pm1 $mapping -ps1 $min -px1 $max $currContext; art3dUpdatePFXPressureMap( "Pmap1", $mapping, $min, $max ); break; case 2: art3dPaintCtx -e -pm2 $mapping -ps2 $min -px2 $max $currContext; art3dUpdatePFXPressureMap("Pmap2", $mapping, $min, $max ); break; case 3: art3dPaintCtx -e -pm3 $mapping -ps3 $min -px3 $max $currContext; art3dUpdatePFXPressureMap("Pmap3", $mapping, $min, $max ); break; } } }