|  | 
| 
			 
			#1  
			
			
			
			
			
		 | |||
| 
 | |||
| 
				
				osg Sequence
			 
			
			Hi, Im loading an ive file with an osg sequence that i would like to control. Whats the best way of doing this? I would like to be able to stop, start and set the current time of the sequence. Thanks TarkaDahl | 
| 
			 
			#2  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			There's currently no built-in support for this, but we will add it to a future release. If you are familiar with C++ programming and OpenSceneGraph, you could write a Vizard extension that does this. Our SDK is freely available and contains an example for writing an extension that interacts with the underlying scene graph of a node. | 
| 
			 
			#3  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			Hi Im having a problem with this ive been looking at the example of creating an modifier using the sdk but how do a get from the osg::Node to the osg::sequence ive looked at the documentation here. http://www.openscenegraph.org/docume...cs/a00654.html and it explains functions that i need to call on the osg sequence but i cant find how to get to the osg::sequence Sorry it that doesnt make sence. but ive not used c++ for a while and have only done the basics of OpenSceneGraph. I will do more reading about it later but any help would be good. Thanks TarkaDahl | 
| 
			 
			#4  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			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)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 | 
| 
			 
			#5  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			hi farshizzo, Thanks for that it works like a dream. Thanks | 
|  | 
| 
 | 
 | 
|  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 |