You did change NameOfYourHudHandle to the name of your hud handle which seems to be HUDCameraFL?
Besides, the script you use actually uses 1 extra cycle the line:
headsUpDisplay -edit -label $label HUDCameraFL;
is obsolete, and causes a error! from the command line reference, ive underlined the relevant bits:
QUOTE
-command(-c) script
Specifies the procedure or script to run, in order to obtain the desired information. This must return a value or an array of values. A warning will be displayed if the command does not return a value. This flag MUST always be accompanied by a trigger flag (eg. a condition flag, an event flag, an attachToRefresh flag, etc.).
Theres a another design flaw in the script too, string $focus = getPanel -withFocus
; isnt exactly what you expect here, it does work, but its a bit no no in maya development terms. You should preferably bind the hud to a fixed camera and use attribute change as event instead. (off course that way you can only monitor one camera but the hud only monitors one camera at a time as it is now anyway), in actuality you should make a condition that monitors BOTH time change and the change command. If your really pro you'd edit the affected attribute with a script job, and enable the expression only on playback.
So quick but unbelievably dirty fix is:
CODE
global proc string XXXFocalLength()
{
string $focus = getPanel -withFocus
;
string $camera = modelPanel -q -camera $focus
;
float $focal = getAttr ($camera + ".focalLength")
;
return ("" + $focal + " mm");
}
replace XXX with your initials! (forcalLength is a BAD name for a global procedure, you will have clash sooner or later)
And the rest would be:
CODE
headsUpDisplay
-s 3
-b 0
-ba "left"
-dw 100
-dfs "large"
-blockSize "large"
-labelFontSize "large"
-command "XXXFocalLength()"
-event "ModelPanelSetFocus" "timeChanged "
HUDCameraFL;
expression -n "hudRefresh"
-s ("headsUpDisplay"+
"-refresh HUDCameraFL;")
-o "" -ae 1 -uc al;
again change XXX.
PS: i haven't tested if they actually forced huds to work again so test attach to refresh also without the expression.