Hi! I noticed that in Cinema 4D 2026.1.2, c4d.EventAdd() doesn't work when it's executed with a modal dialog. With an async dialog it works just fine. In Cinema 4D 2025.3.3 both dialog types works just fine. Has something changed? Do I need to call c4d.EventAdd() somewhere else to use it with a modal dialog?
Example code
import c4d
from c4d import gui
doc: c4d.documents.BaseDocument
op: c4d.BaseObject | None
class Dialog(gui.GeDialog):
def __init__(self):
super(Dialog, self).__init__()
self.res = c4d.BaseContainer()
def CreateLayout(self):
self.SetTitle("Test")
self.GroupBegin(1000, c4d.BFH_LEFT | c4d.BFH_SCALEFIT, 1, 2)
self.GroupBorderSpace(5, 5, 5, 5)
self.AddButton(1001, c4d.BFH_LEFT, name="OK")
self.GroupEnd()
return True
def Command(self, paramid, msg):
if paramid == 1001:
null = c4d.BaseObject(c4d.Onull)
doc.InsertObject(null)
c4d.EventAdd()
self.Close()
return True
dlg = Dialog()
dlg.Open(c4d.DLG_TYPE_MODAL_RESIZEABLE, pluginid=0, xpos=-1, ypos=-1, defaultw=0)
In the example the null object is inserted to the document and it should appear instantly after pressing the OK button.





