|
Create an empty set, add an animated attribute, then delete the key(s). The set itself is deleted along with the key. Why is this happening? Is it expected? If the set contains any objects, then it not deleted.
Thanks!
from pymel.core import *
select(clear = True) testSet = sets(name = "the_set") testSet.addAttr("animated_attribute", at = "bool", keyable = True) setKeyframe(testSet.animated_attribute, t = 5, v = True) #this next line results in the set itself being deleted!! cutKey(testSet.animated_attribute, option = "keys", clear = True)
|
|
|
|
I really did not expect that actually.
I was certain there must be something wrong with the code, but it seems not. It happens no matter how many curves are connected either, it will delete those too.
Will have to look further into this.
You can avoid it by disconnecting the attribute first, then cutting the key from the curve node instead (I have already tried this whilst connected, but same results)
disconnectAttr(testSet+'_animated_attribute.output', testSet.animated_attribute) cutKey(testSet+'_animated_attribute', option = "keys", clear = True)
Lee Dunham | Character TD
ldunham.blogspot.com
|
|
|