I have a problem with tools in the ViewerApp: If the default scene is not created by the viewerapp itself, but via the Factory method and then handed into the viewerapp in the constructor the tools do not work (at least with macosx 10.4.8 intel). I have checked in a test (in the test folder as de.jreality.ui.viewerapp.ViewerAppFromScene).
Can anyone confirm the behaviour, or fix the problem, or hint me to what causes this? I could not find any possible reason for this...
Tim
problem with tools in viewer app
The problem is that scene.getSceneRoot() does return the scene graph's root node and not the scene node where the default tools are attached (when loading the default scene).
de.jreality.ui.viewerapp.ViewerAppFromScene works fine after replacing scene.getSceneRoot().addChild(sgc) by scene.getSceneRoot().getChildComponent(0).addChild(sgc).
Note that this is the case when JrSceneFactory.getDefaultDesktopScene() is used. Other scenes may have their tools attached to the root node.
Should we fix this in JrSceneFactory.getDefaultDesktopScene()?
Regards, Martin
de.jreality.ui.viewerapp.ViewerAppFromScene works fine after replacing scene.getSceneRoot().addChild(sgc) by scene.getSceneRoot().getChildComponent(0).addChild(sgc).
Note that this is the case when JrSceneFactory.getDefaultDesktopScene() is used. Other scenes may have their tools attached to the root node.
Should we fix this in JrSceneFactory.getDefaultDesktopScene()?
Regards, Martin