So I am trying to write a generalized procedure in MEL that will end up keying a bunch of attrs all at once. The problem is that I want to be able to key the attrs at times other than the current frame. Easy enough with the -time flag. But I want the attr to be keyed with the value that it has *at that time*. The problem is that the default value to which to set the key is the value at the current frame (which of course makes sense). And I can override that value with the -value flag.
Now here's the rub: I'll have to specify the value with a variable. I'll have to get the value using getAttr with the -time flag. But since I want to use this in a general way, I won't always know the return value in advance. Sometimes it might be a double, sometimes a double3 or an int. What approach would you take to the variable scheme is this situation? Thanks in advance and