WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-27-2014, 05:55 PM
masaki masaki is offline
Member
 
Join Date: Jan 2008
Posts: 63
R3 required the animpath.dlm plugin to run exported animations. In R4 you need to use the undocumented plugin scenegraphtools.dle.
The following code determines what version (R3 or R4) of Vizard you're running, and loads either the animpath module (for R3) or a wrapper class I've written that runs the scenegraphtools.dle (for R4). With the wrapper class you won't need to change any of your existing code that controls the animation. If you upgrade to R5, animation control is now part of the viz.VizNode object, so you'll have to change your code.

Best,
Masaki

Code:
# CHG: animation control depends on R3 or R4!!
currentVizardVersion = viz.version()
releaseVersion = int(currentVizardVersion.split('.')[0])
if releaseVersion == 4:
	viz.logNotice( 'Running Vizard R4' )
elif releaseVersion == 3:
	viz.logNotice( 'Running Vizard R3' )
else:
	viz.logError( 'Unknown Vizard Release!' )


if releaseVersion == 3:	
	import animpath
elif releaseVersion == 4:
	osg = viz.addExtension( 'scenegraphtools.dle' )
	
	class AnimationPathWrapper(osg.AnimationPath ):
		"""
		This class will allow the new animation path code for R4 to still work for
		the old R3 method.
		"""
		
		def __init__(self):
			pass

		def Path(self,node):
			osg.AnimationPath.__init__(self,node)
			return self
			
	animpath = AnimationPathWrapper()
Reply With Quote
 


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
Apartment demo/texture demo pwsnow Vizard 10 10-05-2012 11:10 AM
PPT Demo mikestatic Precision Position Tracker (PPT) 1 09-23-2007 11:31 AM
demo of new hand.getFingerTip() halley Vizard 9 12-14-2006 01:40 AM
Glenn Kawesch, looking for demo GlennKawesch Vizard 2 10-19-2006 10:17 AM
using demo with intersense G-Chan Vizard 1 02-06-2006 03:05 PM


All times are GMT -7. The time now is 08:06 AM.


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