// =========================================================================== // 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 blendShapeCreateGroupForSelected() // // Description: // Create a new group for the selected items // { string $selectedBsdsAndBsdGroups[] = getShapeEditorTreeviewSelection(7); if (size($selectedBsdsAndBsdGroups) > 0 && !isShapeEditorRefItemSelected()) { blendShapeCreateBlendShapeGroup($selectedBsdsAndBsdGroups); return; } string $selectedTargetsAndTargetGroups[] = getShapeEditorTreeviewSelection(9); if (size($selectedTargetsAndTargetGroups) > 0) { blendShapeCreateTargetGroup($selectedTargetsAndTargetGroups); return; } if (size(getShapeEditorTreeviewSelection(8)) > 0) error -n (uiRes("m_blendShapeCreateGroupForSelected.kNewGroupErrorDifferentNode")); else if (size(getShapeEditorTreeviewSelection(0)) > 0 || size(getShapeEditorTreeviewSelection(1)) > 0 || size(getShapeEditorTreeviewSelection(2)) > 0 || size(getShapeEditorTreeviewSelection(3)) > 0 || size(getShapeEditorTreeviewSelection(4)) > 0 || size(getShapeEditorTreeviewSelection(5)) > 0 || size(getShapeEditorTreeviewSelection(6)) > 0) { if(isShapeEditorRefItemSelected()) error -n (uiRes("m_blendShapeCreateGroupForSelected.kNewGroupErrorHasRef")); else error -n (uiRes("m_blendShapeCreateGroupForSelected.kNewGroupErrorDifferentType")); } else blendShapeCreateBlendShapeGroup($selectedBsdsAndBsdGroups); }