RestrictedAccessException using PickTool.setCapabilities()
Hi, I have a BranchGroup representing some data points. I build it and add it to a scenegraph (SimpleUniverse) after the initial scene is rendered. (User opens a file with the positional data for the primitives.) Works fine. Also, I allow the user to detach that branchgroup, and add a different one. Works fine too.
Problem is, when I create a branchgroup I call:
for the primitives. This is long before I add it to the scenegraph. It works fine for the initial data, but the second time around throws the restricted access exception "Cannot modify capability bits on a live or compiled object." I don't understand, b/c at that point nothing in the BranchGroup is live or compiled, and there is no reference to the scene in the group yet.
Does PickTool have some sort of static reference in a SimpleUniverse?
I could just rebuild the entire scene from scratch, but it would be nicer not to. Anyone see the problem here?