// =========================================================================== // 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 performDuplicatePoseShape(string $tpl, string $poseName, string $blendShape) { poseInterpolatorGoToPose($tpl, $poseName); //Get base meshes string $baseMeshes[]=`blendShape -q -g $blendShape`; //Duplicate string $dupMeshes[]; for ($i = 0; $i < size($baseMeshes); ++$i) { string $longName = longNameOf($baseMeshes[$i]); string $shortName = shortNameOf($baseMeshes[$i]); string $name; if (size($baseMeshes) == 1) $name = $poseName; else $name = $baseMeshes[$i] + "_" + $poseName; string $copyMesh[] = `duplicate -name $name $longName`; $dupMeshes[size($dupMeshes)] = $copyMesh[0]; } //Select select $dupMeshes; }