brettwiesner wrote on Thursday, October 02, 2008 2:22 PM:

> Jean,
> 
> I did try my original solution which is how I know it writes out .ive
> files. I also just implemented the visitor solution to see what happens.
> As expected, the visitor goes and changes the names of all the
> referenced files. Then the top level file is written out. The proxy
> nodes try to write themselves out but since the files they reference
> ("referencedFile.eive") doesn't exist, nothing is written out.
> 
> I would need to be able to change the proxy node ReadWrite class which
> is the part of the IVE loader that says to write out proxy nodes as
> "ive" files. This would require me to derive from ReaderWriterIVE and
> subclass the ProxyNode class so it writes out an "enc" file instead of
> an "ive" file.

Looking at ReaderWriterIVE, it looks like PagedLOD doesn't even try to write 
its children (unless they are already loaded), so if that's what you've got in 
your database, you'll have to manually encrypt its referenced files.

If you've got ProxyNodes, it looks like you can disable automatic writing of 
its referenced files by putting "noWriteExternalReferenceFiles" into the 
Options; then you can manually encrypt the referenced files (you'd still have 
to changed the referenced filenames to "eive"). This would be a workaround to 
subclassing ReaderWriterIVE.

I think the existing mechanisms to do this are not very pretty (and 
inconsistent between ProxyNode and PagedLOD), so if you would like to suggest 
improvements, that would be great!

> Jean-Sébastien Guay wrote:
>> Hi Brett,
>> 
>> I'm wondering, if you suspect that ProxyNodes (and thus PagedLOD nodes
>> as well) would be a problem, why don't you just run a visitor that
>> would find those, and change their extension to eive (or whatever you
>> want)? Then if you write the top-level file, it will write the
>> referenced files with the right writer, and they will be re-read correctly
>> as well... 
>> 
>> Or, try it without and see what happens. If what you suspect turns out
>> to be true, then you have a possible solution above, but if it all
>> works like magic you won't have wasted any time.
>> 
>> Hope this helps,
>> 
>> J-S
> 
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to