Parsing a file to get a list for selecting files from for importing ?

Hello,

I am creating a model file importer, its working fine for a single file already.
Now I would like to make it more comfortable.

The model files are stored inside a directory structure consisting out of numbers. So it is hard to get the right file.
The topmost directory contains a project.dat that contains a list of the models names and its directory id (and some more informations.

Now I would like to:

  • have a file browser to select the project.dat file and parsing it (not a problem)
  • creating something like a list of all model names to select one model for import (?)
  • importing models by selecting one model from a list? / combobox?

How can I solve this ?
Is it possible to store the models names to a panel with buttons or a combo box to select a file to load ?
This way I can load more files later on reusing the same list without having to parse the project.dat again.

Any other ideas to solve something like that ?

Best regards,
Ingo

Ok, got it working via an EnumProperty and a callback function.

I found the solution at blender.stackexchange.com.
http://blender.stackexchange.com/questions/10910/dynamic-enumproperty-by-type-of-selection