#46 How can I change the precision of the floating point values in Maya’s editors (such as the Channel Box, Attribute Spreadsheet and Attribute Editor)?
Maya defines a global string to store the name of its main Channel Box:
This is typically something like:
Thus, to reliably modify the Channel Box ‘precision’ property:
global string $gChannelBoxName;
channelBox -e -precision 4 $gChannelBoxName;
The Attibute Spreadsheet offers no convenient global, but can it can be sussed through a few queries:
int $precision = 4;
// Get a list of all current Editors
string $editors = `lsUI -editors`;
for ( $ed in $editors )
// If this one is a spreadSheetEditor, edit its 'precision' flag
if ( `objectTypeUI $ed` == "TspreadSheetEditor" )
spreadSheetEditor -e -precision $precision $ed;
The Attribute Editor is a complex beast that is controlled through AEtemplate scripts and several functions built into the kernal. While it would be theoretically possible to navigate and edit the precision of the AE controls, it would likely prove to be more work than it’s worth.
None of these adjustments are persistent. The Channel Box will reset when Maya is restarted, and the Attribute Spreadsheet will revert if it is closed and re-opened.
If you want to hard-code the changes:
Add the precision alteration to your userSetup.mel.
Find the MEL script that generates the window:
and alter the lines that create the spreadsheet:
// Add Precision flag
Wednesday, November 29, 2000