// =========================================================================== // 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. // =========================================================================== // // polyCreaseCallback is used by polyCreaseCtx context // // input // tool: calling context // action: "press", or "release" // global proc polyCreaseCallback(string $tool, string $action) { global string $savePolySelectConstraintState; if($action == "press") { // initialize selection constraint $savePolySelectConstraintState = `polySelectConstraint -q -stateString`; int $extendCrease = `polyCreaseCtx -q -extendSelection $tool`; polySelectConstraint -shell off -border off -crease $extendCrease; } else if($action == "release") { // restore selection constraint eval $savePolySelectConstraintState; } else { // Report invalid action error((uiRes("m_polyCreaseCallback.kInvalidActionParam"))); } }