View Single Post
  #2  
Old 04-06-2010, 01:11 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could use <node3d:avatar>.getAnimationList and check the length of the list returned. If the ID is greater then that length the animation is not defined.
Code:
animations = avatar.getAnimationList()
if 123 <= len(animations):
	avatar.state(123)
else:
	print 'The avatar does not have this animation id'
Reply With Quote