Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / [SOLVED] Adding Nodes to an AnimationNode
  RSS 2.0 ATOM  

[SOLVED] Adding Nodes to an AnimationNode
Rate this thread
 
60546
 
Permlink of this thread  
avatar
  • Total Posts: 8
  • Joined: 22 July 2008 05:19 PM

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 pTimefloat pData)

Any help appreciated!

Thanks.



Replies: 0
avatar

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]


Replies: 0