Hello,
I've written an exporter plugin (not save-as) that exports a given file to a custom format.
I was able to open a file selector dialog and choose a path that is then transported to the saving location.
Now my problem is: Another intended use is batch exporting many files. The user records an action with the export step and then applies a batch on it.
The PS batch window allows you to select the destination to be a directory where the exporter should write the data. Fine.
Now how do I get this path? When running in batch mode the silent flag is set for my plugin so I do not spawn a file selector dialog to annoy the user.
But I am also unable to obtain the path which was selected by the user in the batch window.
The SDK automation plugin Getter
has some code to retrieve the path of the file and even that fails as it cannot obtain anything.
PropertyUtils.h
has some PIGetWorkPathIndex
and PIGetPathName
functions but I always get 0 when asking PIGetNumberPaths
, and get -1 with PIGetWorkPathIndex
.
I would be thankful if somebody could hint me how I can retrieve directories.
It even seems impossible for me to get the path where the file is actually saved. The filter plugin called Propertizer utilizes a function called PIGetDocumentName
but this only outputs the file name, not the full path.
(Just to be sure: The file on which the tests run is already saved to disk, if that matters)
Another fun part is: When I record an export step, what is the directory I am exporting into?