// =========================================================================== // 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. // =========================================================================== // Selects the appropriate pickWalk command, // depending on the current selection. // // global proc pickWalkRight() { string $cmd; string $p = `getPanel -withFocus`; int $isUV = startsWith($p, "polyTexturePlacementPanel"); if ($isUV) { int $nudgeUVAbsolute = 0; if(`optionVar -ex polyNudgeUVAbsolute`) $nudgeUVAbsolute = `optionVar -q polyNudgeUVAbsolute`; if( $nudgeUVAbsolute ) optionVar -intValue polyNudgeUVAbsolute 0; $cmd = "performPolyNudgeUVs right"; evalEcho($cmd); if( $nudgeUVAbsolute ) optionVar -intValue polyNudgeUVAbsolute 1; } else { $cmd = "pickWalk -d right"; string $type = ""; // if any keys are selected, do a key pickwalk float $keys[] = `keyframe -q -selected`; if ( size( $keys ) != 0 ) { $type = "keys"; } if ( size( $type ) == 0 ) { // if any lattice points are selected, do a lattice pickwalk string $latticeSel[] = `filterExpand -sm 46`; if ( size( $latticeSel ) != 0 ) { $type = "latticePoints"; } } if ( size( $type ) == 0 ) { // if any poly edges are selected, do an edgeloop pickwalk string $edgeSel[] = `filterExpand -sm 32`; if ( size( $edgeSel ) != 0 ) { $type = "edgeloop"; } else { string $faceSel[] = `filterExpand -sm 34`; if (size($faceSel) != 0){ $type = "faceloop"; } } } if ( size( $type ) == 0 ) { // if any motoinTrail points are selected, do a motionTrail pickwalk. Note that the '84' is defined in TselectionTypeSet.cpp string $motionTrailSel[] = `filterExpand -sm 84`; if ( size( $motionTrailSel ) != 0 ) { $type = "motiontrailpoints"; } } // append the type, if any if ( size( $type ) != 0 ) { $cmd += " -type " + $type; } evalEcho($cmd); } }