// Malcolm Kesson
  
global proc addFloatAttr(string $name, float $value) { 
    string $sel[] = `ls -sl`;
    for($current in $sel) {
        string $shapes[] = `listRelatives -s $current`;
        string $shape = $shapes[0];
        if(size($shape) == 0)
            continue;
        if(attributeExists($name, $shape) == 0) {
            addAttr -ln $name -sn $name -k 1 $shape;
            }
        setAttr ($shape + "." + $name) $value;
        }
    print("Added attribute \"" + $name + "\" with a value of " + $value + "\n");
    }