Don't add init_unreal.py startup scripts to Recent Python Scripts menu

When running the Editor and using the PythonScriptPlugin, scripts named init_unreal.py in python script paths are automatically run and handle initialization for various python functionality in one’s project or plugins.

The Editor also contains functionality to manually run a Python Script using Tools -> Execute Python Script. Recently run Python scripts get included in the Tools -> Recent Python Scripts menu for convenience and re-running.

Unfortunately, when the Editor starts up, all of the init_unreal.py files get added to the Recent Python Scripts menu, making it pretty much useless for actually rerunning recent scripts, particularly when you have many plugins utilizing this functionality.

I have put up a PR here: https://github.com/EpicGames/UnrealEngine/pull/14410

This change prevents the startup scripts from being added to the Recent Files list, making that list more useful to users.

Thanks!

[Attachment Removed]

Steps to Reproduce

  1. Have at least one init_unreal.py script in your project or plugins.
  2. Run the Editor
  3. Note that init_unreal.py appears in Tools -> Recent Python Scripts
    [Attachment Removed]

Thank you Zach for the pull request! I went ahead and fixed the issue with a slightly different solution.

If you have access to our perforce history that would be CL 51054463. Otherwise, I can send you the change via GitHub once it’s replicated over there.

[Attachment Removed]

That solution looks good. Thanks!

[Attachment Removed]