Which message do I receive when a command plugin dialog is closed?
-
I have a command plugin with a dialog.
Which message do I receive when I close this dialog?This is how I checked for a close dialog.
class MyDialog(gui.GeDialog): def Message(self, msg, result): id = msg.GetId() #print "id: ", id if (id == c4d.C4DPL_END): print "Plugin closed." return gui.GeDialog.Message(self, msg, result)
-
You can simply implement
AskClose()
: https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/GeDialog/index.html?highlight=askclose#GeDialog.AskCloseOr even
DestroyWindow()
etc. -
Hello,
as @mp5gosu has pointed out you can implement
AskClose()
andDestroyWindow()
to be informed on these events.You find an example for
AskClose()
in Py-TextureBaker.pyp.You also find general information on GeDialog in the C++ documentation:
best wishes,
Sebastian -
@s_bach said in Which message do I receive when a command plugin dialog is closed?:
DestroyWindow
Thanks.
By the way, compliments on the latest R20 C++ manual. It is great!