// =========================================================================== // 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. // =========================================================================== // // // Creation Date: September 2006 // // // // // // setAttrNiceNameResource(string $nodeType, string $attrShortName, string $str) // // // // Convenience routine to define localizable string resource values // for an attribute's niceName value. // // // string $nodeType the node type // string $attrShortName the attribute's short name // string $str displayable nice name string to be associated with this attribute // // // // // Set the attribute nice name string associated with // // attribute "spos" on node type "myNode". This example shows an // // English resource name, however this routine would more often // // be called in practice to provide localized string values. // // // setAttrNiceNameResource( "myNode", "spos", "Start Position"); // // // global proc setAttrNiceNameResource( string $nodeType, string $attrShortName, string $str ) { // Key has format n_NNN.a_AA1_niceName // Where NNN = node type // AA1 = attribute short name string $fullId = "n_" + $nodeType + ".a_" + $attrShortName + "_niceName"; displayString -replace -value $str $fullId; }