Retrieving filename before export dialog

On 28/04/2016 at 11:16, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R17 
Platform:   Windows  ; Mac  ;  
Language(s) :     C++  ;

I have SceneSaver plugin and I need to do some modifications of shown description based on selected filename. I tried to check DOCUMENT_SAVEDOC_DESTINATIONPATH, but it is not set before Save method is called (nor during MSG_DESCRIPTION_IMPEXPORT_INIT neither in Description callbacks). I found similar question ( regarding SceneLoader plugin, but the answer there is not usable in case of saver.

I know I could register saver with PLUGINFLAG_SCENEFILTER_DIALOGCONTROL and run my own dialog from within Save method, but I would like to avoid added complexity if there is better solution...

So, is there a way to get name of selected file before Save method (preferably in MSG_DESCRIPTION_IMPEXPORT_INIT message)? Or if not, is it possible to open registered description manually from Save without handling my own GeDialog instance?

On 29/04/2016 at 03:04, xxxxxxxx wrote:


What kind of changes do you want to make in the description of the SceneSaver?

Descriptions can only be changed in GetDDescription().
Note DOCUMENT_SAVEDOC_DESTINATIONPATH is only meant to be used internally and is only available when the exporter is invoked with SaveDocument().
In such case, in Save() name  argument and DOCUMENT_SAVEDOC_DESTINATIONPATH are the same but that's not useful in the end.

On 29/04/2016 at 03:31, xxxxxxxx wrote:

The export can (only with some settings) produce more that one file (in a way that single folder with assets doesn't make sense). For that reason, I wanted to give the user some more control over the files being created and for that I need to know filename user selected in previously shown save dialog (yes, I am doing those modifications in GetDDescription).

It is only a matter of slightly more logical GUI design, so if there is no way to get Filename during GetDDescription, I can do it without it - it is not too important.

Thanks for answers, you can consider this resolved.