View Full Version : `cutKey -time` problemo
02-13-2004, 10:49 AM
I´m trying to delete a keyframe at the current time, but I get the following error when I execute the command:
cutKey -t `timeControl -q -range $gPlayBackSlider`;
// Error: line 1: Invalid time unit: "722:723" //
However, if I do: cutKey -t "722:723" ...all works fine. What´s up with this?
02-13-2004, 11:56 AM
I would use
float $time = `currentTime -q`;
to get the current time and then throw that into
cutKey -time $time;
Seems to work for me.. It deleted the keyframe under the position where the slider is.
But I know what you mean.. it doesn't seem to like that...
I think I figured it out though:
timeControl -q -range $gPlayBackSlider
returns "24:25" including the quotes.
If you did this:
string $time = "24:25";
cutKey -t $time;
it will work. You will need to strip the quote marks off of the value given by
timeControl -q -range gPlayBackSlider
02-13-2004, 01:05 PM
ahh, OK. I ran into this problem some time ago- also dealing with keyframes. I´ve stripped the quotations and now it´s working. I kept the timeControl -range in order to delete keys within a selected time range.
Thanks for your help.
02-13-2004, 01:36 PM
I´ve discovered a bug, though, in Maya 5.01, when using character sets with object attrs that have constraints via pairBlend nodes: the "Delete" command in the TimeSliderMenu (which calls the timeSliderClearKey proc in TimeSliderMenu.mel) will not delete attribute keyframes that have connections via the pairBlend node (even though these attrs are included in the character set, as well as the additional "blendPoint1" attr that was created when applying the constraint).
(I´ve worked around this by creating my own cutKey command and parenting it to the TimeSliderMenu.)
This new setup in Maya 5.01, where the user can blend between keys and constraints via the pairBlend, is absolutely *great*, but it´s a shame that this command will not work correctly together with character sets. Now I´m wondering if any other commands (specifically those that manipulate keyframes in the TimeSliderMenu.mel script) will also not work right....?
Maybe someone from Alias would care to comment on this???
01-17-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.