WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Plug-in development (https://forum.worldviz.com/forumdisplay.php?f=8)
-   -   How to get VizChild from an osg::Node (https://forum.worldviz.com/showthread.php?t=5155)

yomomano 08-29-2014 06:54 AM

How to get VizChild from an osg::Node
 
I made an extension to find a osg::Node in the osg sceneGraph using a name path (as in a/b/c) in order to speed up the lookup in a huge scene.

I want to return the found osg::Node as a VizChild. How can I do this in the extension? I don't have/need a custom node.

The only way I managed to do this is by returning the osg::Node name, and in python script calling 'parent.getChild(name)'. But when the parent is not a known VizChild, this fails.

Ex in py script I want to do this:

#sceneRoot is a VizGroup
node = myextension.findNode(sceneRoot, 'a/b/c')

#node should be a VizChild made from the underlying osg::Node with name 'c'

Thanks!


All times are GMT -7. The time now is 01:26 PM.

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