WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-29-2014, 07:54 AM
yomomano yomomano is offline
Member
 
Join Date: Aug 2014
Posts: 2
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!
Reply With Quote
Reply


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
'VizChild' object has no attribute 'state' nat_bor Vizard 3 03-12-2011 12:51 AM


All times are GMT -7. The time now is 06:36 PM.


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