// =========================================================================== // 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 blendShapeImportShapes() { // Single blendShape node is selected. if (size(getShapeEditorTreeviewSelection(11)) == 1) { string $shpFileFilter = (uiRes("m_blendShapeImportShapes.kShape")) + " (*.shp) (*.shp)"; string $title = (uiRes("m_blendShapeImportShapes.kImportShapes")); string $result[] = `fileDialog2 -fileFilter $shpFileFilter -caption $title -fileMode 1`; if (size($result) == 0) return; string $filePath = $result[0]; string $bsArray[] = getShapeEditorTreeviewSelection(11); string $bsNode = $bsArray[0]; blendShape -edit -import $filePath $bsNode; // in case the progressbar is enabled and not stop normally global string $gMainProgressBar; if (`progressBar -query -isCancelled $gMainProgressBar`) {} else { progressBar -edit -endProgress $gMainProgressBar; } } }