ljilekor
01-03-2007, 02:51 PM
How do I delete all keyframes of a certain attribute without deleting the object itself???
Looks like a simple thing...
This is my specific case:
//CREATE a 4x4Matrix and ADD an keyable bool attribute
createNode "fourByFourMatrix" -n TEST;
addAttr -ln "switch" -keyable true -at bool TEST;
//Create a few random keys.
currentTime 0 ;
setAttr "TEST.switch" 0;
setKeyframe TEST;
currentTime 8 ;
setAttr "TEST.switch" 1;
setKeyframe TEST;
currentTime 15 ;
setAttr "TEST.switch" 0;
setKeyframe TEST;
currentTime 22 ;
setAttr "TEST.switch" 1;
setKeyframe TEST;
//etc...
//TRY to delete keyframes
selectKey -r -k -at "switch" TEST;
cutKey -animation keys -clear -selectKey;
The whole Matrix is deleted ?????? :eek:
Could this be because there's only one keyable attribute on the object????
Anyway I don't get it. I specify that only the keys should be cut (-animation keys ) but... .
When I delete the keys by hand in the graph editor everything seems to work fine (The matrix is not deleted with the keys). The same code is generated :
selectKey -r -k -at "switch" TEST;
cutKey -animation keys -clear -selectKey;
if I add another attribute (I don't need it though) after creating the matrix, things work fine.
addAttr -ln "uselesscrap" -keyable true -at bool TEST;
Well... In this example. Not in my 500 lines script.:banghead:
Really smells like a bug...
Looks like a simple thing...
This is my specific case:
//CREATE a 4x4Matrix and ADD an keyable bool attribute
createNode "fourByFourMatrix" -n TEST;
addAttr -ln "switch" -keyable true -at bool TEST;
//Create a few random keys.
currentTime 0 ;
setAttr "TEST.switch" 0;
setKeyframe TEST;
currentTime 8 ;
setAttr "TEST.switch" 1;
setKeyframe TEST;
currentTime 15 ;
setAttr "TEST.switch" 0;
setKeyframe TEST;
currentTime 22 ;
setAttr "TEST.switch" 1;
setKeyframe TEST;
//etc...
//TRY to delete keyframes
selectKey -r -k -at "switch" TEST;
cutKey -animation keys -clear -selectKey;
The whole Matrix is deleted ?????? :eek:
Could this be because there's only one keyable attribute on the object????
Anyway I don't get it. I specify that only the keys should be cut (-animation keys ) but... .
When I delete the keys by hand in the graph editor everything seems to work fine (The matrix is not deleted with the keys). The same code is generated :
selectKey -r -k -at "switch" TEST;
cutKey -animation keys -clear -selectKey;
if I add another attribute (I don't need it though) after creating the matrix, things work fine.
addAttr -ln "uselesscrap" -keyable true -at bool TEST;
Well... In this example. Not in my 500 lines script.:banghead:
Really smells like a bug...
