I had try many times,but when I use
SceneGraphFileWriter writer = new SceneGraphFileWriter(file,universe,true,“test”,null);to output scenegraph to the file,I will get node’s attributes can’t be read CapabilityNotSetException, and then I set all node’s attributes’ capability to ALLOW_READ.
Finally I get can’t get RestrictedAccessException
so…I think there is other method should be call,before I use SceneGraphFileWriter to export scenegraph…
If someone knows how to use, or sample code can be see.
Please tell me, thanks~
My JDK is 1.5 and Java3D API is 1.3.1
thanks~
One thing you might try is to write the scenegraph before setting it to “live”, or before compiling it. Live or compiled scenegraphs are much pickier about what capabilities are set.
IIRC, there’s also a utility method (in com.sun.j3d.utils.scenegraph.io ?) that will recursively set the capabilities properly for the entire scenegraph.