I have a file select property I am using, defined like so:

psa_filepath: StringProperty(default='', subtype='FILE_PATH', update=on_psa_filepath_updated)

The on_psa_filepath_updated function loads and inspects the file to list out its contents so that the user can choose what elements to import.

enter image description here

Unfortunately, I see no way to tell the file dialog for this property to have extension filtering (in this case I only want to see *.psa files).

I am aware of this question that asks the same thing, but the top answer does not directly address the question.

It seems like massive overkill to require users to create a whole separate file select operator just to get basic functionality like this. Is there a way to do this more succinctly?

  • $\begingroup$ I don't think there is a way unfortunately, and I think the answer is right in pointing that one has to implement a custom operator to do extension filtering. $\endgroup$
    – Gorgious
    Jan 17, 2022 at 21:52
  • $\begingroup$ Are you writing your own PSA importer? If you're working with an existing addon, which one? $\endgroup$ Jan 18, 2022 at 1:27
  • $\begingroup$ I have written my own add-on to both import and export PSK and PSA files. The existing importers and exporters are insufficient for our team's workflow. The link is here: github.com/DarklightGames/io_export_psk_psa The importer functionality is currently on a dev branch. $\endgroup$ Jan 18, 2022 at 6:46


You must log in to answer this question.

Browse other questions tagged .