Thanks Paul, Yes, I found the code in osgPlugins/osg, and don't worry I don't intend on building a large codebase. This is just a hack for now. My intention is to use the osgswig Python wrappers to access OSG more "directly". But for now I'm content to fiddle with .osg files in order to understand the various primitives and how they work. In my case the overhead of doing this is lower than coding things in C/C++; in fact making the .osg files from Python's actually not that onerous a task for the relatively simple stuff I want to do in the short term.
-Pat On Wed, Nov 19, 2008 at 11:36 AM, Paul Martz <[EMAIL PROTECTED]> wrote: > .osg/.ive are not intended to be supported by any software other than > OpenSceneGraph itself, so there is no formal spec per se. If you want to > create a .osg file, the best way to do it is to write code that builds a > scene graph, then call writeNodeFile() to dump it to .osg. You can then > tweak it by hand. Creating it entirely by hand is only for the most gutsy > among us, I imagine. And trying to support the format in other software, > either for reading or writing, seems like it would be fairly tedious and > particularly prone to obsolescence as OSG evolves. > > Anyhow, to answer your question more directly, look in src/osgPlugins/osg. > This is the source code that reads and writes the osg classes to/from .osg. > -Paul > > >> >> I'd like to access OSG from Python but for the moment it's >> not working for me. In the meantime I can get a fair bit of >> what I want to do done by just generating .osg files >> automatically. The problem is that I haven't been able to >> find good documentation on the .osg file and I'm >> reverse-engineering things from .osg files in the examples. >> Is there somewhere obvious I'm not looking for complete .osg >> file format documentation? >> >> To give some scope: All I want to be able to do for now is: >> >> - place primitives (boxes and line segments) in the scene >> - assign different colours to different primitives >> >> I've been able to figure out how to create a Box, but how do >> I set its colour, for example? >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce >> negraph.org >> > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org