// =========================================================================== // 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 isNConstraint(){ global string $nConstraintMembershipConstraint; string $objects[] = `ls -sl`; if (!`size $objects`) error( (uiRes("m_nConstraintMembershipTool.kNothingSelected")) ); string $children[] = `listRelatives -s -type "dynamicConstraint" $objects[0]`; $nConstraintMembershipConstraint = $children[0]; } proc nConstraintMembershipToolCtx(){ scriptCtx -title (uiRes("m_nConstraintMembershipTool.kMembershipTool")) //-image1 "polyPoke.png" -totalSelectionSets 1 -ts "isNConstraint; dynamicConstraintMembership \"select\"" -fcs "global string $nConstraintMembershipConstraint; select -tgl $nConstraintMembershipConstraint; dynamicConstraintMembership \"replace\"; select -replace $nConstraintMembershipConstraint" //-cumulativeLists true -expandSelectionList true -setNoSelectionPrompt (uiRes("m_nConstraintMembershipTool.kSetNoSelectionPrompt")) -setSelectionPrompt (uiRes("m_nConstraintMembershipTool.kSetSelectionPrompt")) //-setDoneSelectionPrompt "Press enter to finish editing constraint membership." -setAutoToggleSelection false -setSelectionCount 0 -setAutoComplete false -polymeshVertex true -polymeshEdge true -polymeshFace true -exitUponCompletion true -toolCursorType "edit" nConstraintMembershipTool; } global proc nConstraintMembershipTool(){ if (!`contextInfo -exists nConstraintMembershipTool`) {nConstraintMembershipToolCtx;} setToolTo nConstraintMembershipTool; }