Hi,
how can I unload or deactivate the default tools "EncompassTool", "DraggingTool", "RotateTool" and / or "AnimatorTool"?
I found them during debugging in ViewerApp -> ToolSystem -> ToolManager -> ToolToPaths, but I don't know how to access them.
Many thanks.
Best regards, Joe
Unload default tools
To remove tools from the ViewerApp application:
1. Turn on display of the Navigator panel.
2. Open the SceneGraphComponent named scene (it may have a different name depending how your scene was constructed) by clicking on the triangle to the left of its name.
3. Select one of the tools which you wish to remove by clicking on its name in the Navigator panel.
4. Using the right mouse context menu, select Remove.
5. Repeat for the other tools.
1. Turn on display of the Navigator panel.
2. Open the SceneGraphComponent named scene (it may have a different name depending how your scene was constructed) by clicking on the triangle to the left of its name.
3. Select one of the tools which you wish to remove by clicking on its name in the Navigator panel.
4. Using the right mouse context menu, select Remove.
5. Repeat for the other tools.
jReality core developer
These tools are added by ViewerApp to the top-level SceneGraphComponent containing the scene (not the root, but a child of the root). You'll need to know which SceneGraphComponent instance this is. (By default it's the child of the scene root named scene). Suppose it's named scene. Then invoke following methods to remove all tools in this component:
It's possible to avoid having these tools added in the first place, by using the following constructor for ViewerApp:
This requires that you create your own camera, and provide the paths shown. These paths can be null, but then some tools may not function as expected. It's probably easier to remove the tools by hand as indicated above.
Code: Select all
List<Tool> tools = scene.getTools();
for (Tool t : tools) scene.removeTool(t);
Code: Select all
ViewerApp va = new ViewerApp(SceneGraphComponent root, SceneGraphPath cameraPath, SceneGraphPath emptyPick, SceneGraphPath avatar);
jReality core developer