createVRMLfromString with an Inline Node ?
Hi !
Why don't you simply use createVrmlFromURL ?
Use a Transform or Group node as container and add it to the scene .
DEF CONTAINER Transform{}
field MFString worldurl ["masphere.wrl"]
field SFNode container USE CONTAINER
.
function addMe(){
Browser.createVrmlFromURL(worldurl,container,'addChildren');
Quote:
}
8-;
all the best,
Roland
Roland Praehofer - webdesign.sound.virtual_environments
web:http://www.memeticdesign.de
tel:+49 30 827 029 77
fax:+49 30 827 029 78
Quote:
> HI
> I can't attach a scenegraph on the fly with the createVrmlFromString()
> function.
> the createVrmlFromString() function is not hard to master but it seems to
> refuses inline nodes.
> I need however to use an Inline node in the string because the scene to load
> (here 'masphere.wrl' is regulary updated by another process.
> So far here is what I wrote in a script :
> newNode = new MFNode();
> sphereString = 'Transform {children [Inline { url masphere.wrl }]}';
> Browser.createVrmlFromString(sphereString);
> print(newNode);
> on the console (Blaxxun) I can see that the last line 'print(newNode);' only
> displays : '[]' meaning the inline node has been ignored.
> Is there a way to make it work please ?
> Thanks