WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-31-2011, 09:11 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Support for controlling osg::Sequence nodes is in the latest version of Vizard (4.02). Here is some sample code:

Code:
import viz
viz.go()

model = viz.add('sequence.ive',pos=(0,1.5,4))

osg = viz.add('SceneGraphTools.dle')
sequence = osg.Sequence(model)

import vizact
vizact.onkeydown(' ',sequence.setMode,vizact.choice([sequence.PAUSE,sequence.RESUME]))
vizact.onkeydown('r',sequence.setMode,sequence.START)
vizact.onkeydown('1',sequence.setFrame,50)
And here is the help print out of the sequence control class:
Code:
class Sequence(object)
 |  Methods defined here:
 |  
 |  __init__(self, node, name='')
 |  
 |  getBegin(self)
 |      Get the begin frame
 |  
 |  getClearOnStop(self)
 |      Get whether to show no children after stopping
 |  
 |  getEnd(self)
 |      Get the end frame
 |  
 |  getFrame(self)
 |      Get the current frame
 |  
 |  getFrameCount(self)
 |      Get the number fo frames
 |  
 |  getFrameTime(self, frame)
 |      Get the time for the specified frame
 |  
 |  getLoopMode(self)
 |      Get the sequence loop mode
 |  
 |  getMode(self)
 |      Get the sequence mode
 |  
 |  getNumRepeats(self)
 |      Get the number of repeat times
 |  
 |  getSpeed(self)
 |      Get the sequence speed
 |  
 |  getSync(self)
 |      Get whether to sync frames with frame time
 |  
 |  iterFrameTimes(self)
 |      Returns iterator that yields frame time values
 |  
 |  setBegin(self, begin)
 |      Set the begin frame
 |  
 |  setClearOnStop(self, clearOnStop)
 |      Set whether to show no children after stopping
 |  
 |  setEnd(self, end)
 |      Set the end frame
 |  
 |  setFrame(self, frame)
 |      Set the current frame
 |  
 |  setLoopMode(self, mode)
 |      Set the sequence loop mode
 |  
 |  setMode(self, mode)
 |      Set the sequence mode
 |  
 |  setNumRepeats(self, repeats)
 |      Set the number of times to repeat
 |  
 |  setSpeed(self, speed)
 |      Set the sequence speed
 |  
 |  setSync(self, sync)
 |      Set whether to sync frames with frame time
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to freeze sequence of actions dwaik Vizard 1 04-05-2010 01:26 PM
How to make character animation sequence wchoi Vizard 3 01-22-2010 08:35 AM
avatar walking over a sequence of points IGoudt Vizard 1 10-16-2009 11:22 AM
stopping a sequence durf Vizard 1 04-14-2009 01:31 PM
animation sequence pkhoosh Vizard 2 01-23-2006 08:03 AM


All times are GMT -7. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC