int params = 0;
if (resize) params = ObjectFile.RESIZE | Loader.LOAD_ALL;
ObjectFile loader = new ObjectFile(params);
try {
BranchGroup bg = loader.load(filename).getSceneGroup();
bg.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
bg.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
bg.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
bg.setCapability(BranchGroup.ALLOW_DETACH);