From e70ece8f10d33c37570231ca533034cc8168e923 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 13 Nov 2012 15:26:06 +0000 Subject: [PATCH] Added --update-active and --update-all command line options that set the UpdateVisitor::TraversalMode to TRAVERSE_ACTIVE_CHILDREN and TRAVERSE_ALL_CHILDREN respecively. --- applications/present3D/present3D.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applications/present3D/present3D.cpp b/applications/present3D/present3D.cpp index 7a5c693fa..a707d78a8 100644 --- a/applications/present3D/present3D.cpp +++ b/applications/present3D/present3D.cpp @@ -537,6 +537,10 @@ int main( int argc, char **argv ) while (arguments.read("--loop")) loopPresentation = true; + while(arguments.read("--update-active")) viewer.getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN); + while(arguments.read("--update-all")) viewer.getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN); + + // register the slide event handler - which moves the presentation from slide to slide, layer to layer. osg::ref_ptr seh = new osgPresentation::SlideEventHandler(&viewer); viewer.addEventHandler(seh.get());