Skip to content

Instantly share code, notes, and snippets.

@fwilleke80
Created March 17, 2017 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fwilleke80/aa1377ddda39bb221d0438fc780a5f01 to your computer and use it in GitHub Desktop.
Save fwilleke80/aa1377ddda39bb221d0438fc780a5f01 to your computer and use it in GitHub Desktop.
[C4D] A really tiny command plugin that restarts Cinema 4D. Only 16 lines long.
#include "c4d.h"
class RestartCommand : public CommandData
{
virtual Bool Execute(BaseDocument *doc)
{
if (GeOutString("Really restart?", GEMB_ICONQUESTION|GEMB_YESNO) == GEMB_R_YES)
RestartApplication();
return true;
}
};
Bool RegisterRestartCommand()
{
return RegisterCommandPlugin(1024172, String("Restart Cinema"), 0, nullptr, String("Restart Cinema 4D now!"), NewObjClear(RestartCommand));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment