// =========================================================================== // 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 NComponentPaintCallback(string $attr) { global string $gArtAttrNComponentCurrentAttr; if ($attr == "") { $attr = $gArtAttrNComponentCurrentAttr; if ($attr == "") { $attr = "strength"; } } else { if (! `exists nComponentAttributeToPaint_uiToMel` ) { source "artAttrNComponentProperties.mel"; } $attr = nComponentAttributeToPaint_uiToMel($attr); } makePaintable -activateAll false; makePaintable -activate true "nComponent" ($attr+"PerVertex"); // The 0 to getNComponentToEdit means we accept component selections // string $comp = `getNComponentToEdit 1`; if ($comp != "") { artAttrPaintInstSelectAllDN("nComponent",($comp+"."+$attr+"PerVertex")); } else { warning((uiRes("m_NComponentPaintCallback.kFoundNoComp"))); } }