Start a new topic

getting switch nodes (children)?

How do I inventory a FLT file for switches, and export a file for each node child?

I only see docs (samples) for creating a switch from scratch.

I'm interested in building a script to process files external from Creator.

Am digging through the API docs.

Pointers gratefully accepted.


Ok, got it. Time to get the OF API 18 refs ;-)
SInce you're using CR 18, you can use mgExportDb to write other (non-OpenFlight) formats. Go to Script>OpenFlight Script Editor and do Help>On Creator Script to get the format keys for the different formats. Also you could use the Creator Script Snippet Wizard (also off the OpenFlight Script Editor) to paste the mgExportDb snippet for the format you choose there.
Have fun scripting!!

Downloading now, thanks!

I appreciate the tips.  Scripting does not come naturally, but with practice I hope to be able to at least roll around in the docs and snippets ;)

If you have some extra time (and have not done so yet) I might also recommend checking out the OpenFlight API Developer Guides. These documents give you a frame of reference for the OpenFlight API, the OpenFlight Scene Graph and how it is structured. OpenFlight Script, after all, is merely a Python wrapper to this API. Perhaps the concepts in the Developer Guides might help you to better understand how to structure and implement your scripts.

Login to post a comment