|
Hi Everyone,
I’m trying to set scripted keys on a property without an existing animation node. Any ideas on how I might create one for it? And hook up any required connections to the model?
An example of this would be to add an animation node to this cube, so the visibility can be keyed.
cube = FBModelCube('Cube') cube.Show = True
animNode = cube.AnimationNode
keyableNodes = animNode.Nodes print [x.Name for x in keyableNodes]
If an animation node existed for ‘visibility’ I could then use:
keyableNodes[int].AddKey(FBTime pTime, float pData)
Any help appreciated!
Thanks.
|
|
|
|
I think I got it…
Needed to set the property to be animatable.
prop = cube.PropertyList.Find ('Visibility') prop.SetAnimated(True)
#reprint nodes keyableNodes = animNode.Nodes print [x.Name for x in keyableNodes]
|
|
|