This is a question out of curiosity, since i kinda found an answer of Normen from some years ago. (: There he said:
You replace the whole rootNode, simpleApplication only updates the preset rootNode, just attach your fakeRootNode to that instead of removing the rootNode.
But in fact. Thats exactly what i want to do: I want to replace the whole rootNode, since this would save my much time of work and effort.:P
I would really love to replace the damned rootNode. ;)
Why or why not shall not be a question here since i could do it in different ways but dont really like to. ( More work is always nasty. )
Anyone of you has an idea wether i can work around this little problem?
( I bet Normen answers first and sais "No": :D )
You can easily do that, the question is why would you? As said you have to manage calling updateLogicalState() and updateGeometricState() on that node yourself and just attaching another node to the rootNode works just as well. What kind of work would it save you? I think it would only produce more work for you. I am sure e.g. mythruna just uses the default rootNode as well, theres no reason to replace it even for large projects, maybe you should rethink whatever strategy makes you think replacing it is a good idea.
You’d have to extend Application instead of SimpleApplication if you want to do it properly. rootNode is created in SimpleApplication, not Application. Just look at how viewport, rendermanager and rootnode etc. is set up in SimpleApplication and copy that, but use viewport.addScene(weirdXMLNode) instead of rootNode etc. I just made an offscreen renderer setup just like that, its not hard.
I (also) think this is a very strange approach tho. It seems like a very convoluted and hard way of doing something easy.
Because i dont know how to be honest.
+1 just for the honesty :)
I tried making a small viewer application in NetBeans Platform (as a sworn Eclipse user). I was able to get a scene canvas on there easily enough but that was about as far as I got. The whole system, and RCP is the same way, is pretty complex to get started doing anything in so I decided to mothball it until I had a few days to devote to it.
but i guess too few ppl really need built-in script support.
With JSR-223, I think it's really easy to add scripting support for a variety of languages. So I think it's just that for the people who would want scripting, they just integrate it themselves (4 or 5 lines of code). For the people who don't know how to integrate it easily, they would probably have trouble getting scripts to work anyway.