-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, 1 Jan 2006, Lalo Martins wrote:
And so says Jonathan Jones on 01/01/06 08:15...
- Complete import/export support to and from blender, for both worlds
and avatars.
So, do we have that fabled import/export subsystem yet? Is it
documented? If so, where? If not, what source code can I read?
Well, sconzey was referring to Blender import/export, which hasn't
changed, but the shiny new VOS import/export module is in place.
Basically, this new code provides a simple API for loading and saving
Vobjects to/from any arbitrary supported file format.
It is as simple as:
VobjectStore* store = VobjectImportExport::loadFile(site, filename);
and
VobjectImportExport::saveFile(store, "gzipped cod", filename);
Where "VobjectStore" is a class that stores a set of Vobjects, with some
features specific to loading/saving operations.
Adding new import/export plugins is a little more complicated, but not too
bad. See at class XODImpExp in vos/libs/vos/vos/xod.cc for an example.
One feature of this system is that it allows for loader/saver modules to
act as filters, so for example the gzip module allows you to load/save any
other format stored in a gzip file.
Once the file is loaded, it gets back the VobjectStore which lists the
Vobjects that were created from the file. At the moment it is up to the
application to figure out which vobject is the root of the file (if that
even makes sense for a given format). This will probably be done simply
having standard names, so a vobject named "world" is a 3D world, the
object named "avatar" has an avatar model, etc :-)
[ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDudqPaeHUyhjCHfcRAsJMAJ9gO6llXn6qdyapRlh0odGSfjiAbQCfVTdu
ttpP77tQkrNj0H0hNDd4jK0=
=DE6t
-----END PGP SIGNATURE-----
_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d