WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   RuralPit demo with v4? (https://forum.worldviz.com/showthread.php?t=5043)

johnallen 05-21-2014 04:37 AM

RuralPit demo with v4?
 
I'm trying to get the old V3 demo 'RuralPit' but am having problems.

The demo loads however the ppt tracking doesn't work (although it does work with other programs)

The main load error I get seems to be

"failed to load plug-in: 'animpath.dlm' "

although the original v3 file (09/06/2010) is in the folder.

It used to work fine until I installed vizard v4.

Any help either getting this working or info about a similar v4 compatible demo would be appreciated.

thanks,

john

Jeff 05-27-2014 04:59 AM

Are you now opening and running the demo from the Vizard 4 IDE? Make sure you're still running it using the Vizard 3 engine. From Vizard 4 you can select Script > Run with Vizard 3.0 if Vizard 3 is also installed on the machine.

If you're still having problems contact support@worldviz.com to request an updated demo.

masaki 05-27-2014 04:55 PM

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()


johnallen 06-11-2014 06:39 AM

Fantastic - thanks Masaki - I will test this out and report back.


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

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