How to stop exports done in code being added to File Recents Menu?

How to stop exports done in code being added to File Recents Menu?

FirespriteNate
Advocate Advocate
406 Views
2 Replies
Message 1 of 3

How to stop exports done in code being added to File Recents Menu?

FirespriteNate
Advocate
Advocate

For a current tool I am writing I need to make lots of temp exports of animations from users scenes. I was originally using:

FBApplication().FileExport(export_path)

but this didn't seem to export the custom animated properties we had on some joints, so I switched to:

FBApplication().FileSave(export_path, FBFbxOptionsObject)

instead, and that seems to work fine now. However, an unintended side effect which I don't remember happening before (though it may have) is that every temp file I export like this gets added to the users "Recent Files" list on the file menu (see attached image). 

This is clearly not ideal, so is there some way I can avoid this happening? Either some mechanism, flag or export option that stops it, or some way to remove the offending items afterward? (obviously I don't want to clear the entire list of recents, as that would probably annoy users more).

0 Likes
Accepted solutions (1)
407 Views
2 Replies
Replies (2)
Message 2 of 3

d.pajda
Explorer
Explorer
Accepted solution
you can achieve this by setting  UpdateRecentFiles to False in FBFbxOptions
 
FBFbxOptionsObject = FBFbxOptions(False)
FBFbxOptionsObject.UpdateRecentFiles = False
0 Likes
Message 3 of 3

FirespriteNate
Advocate
Advocate

Thank you so much! that works perfectly. No idea how I missed this method... 🙈