Hi,
I am running into this problem that when create a dialog and keep its reference alive it generates an EVMSG_CHANGE message whenever I click in the viewport.
I am using Cinema 4D R21.115 on windows.
Here is a small test I created that does not generate any EVMSG_CHANGE messages.
import c4d
class CollectionManager(c4d.gui.GeDialog):
def CoreMessage(self, kind, data):
if kind == c4d.EVMSG_CHANGE:
print("Something changed")
return super(CollectionManager, self).CoreMessage(kind, data)
# Main function
def main():
dialog = CollectionManager()
dialog.Open(c4d.DLG_TYPE_ASYNC, 1040130)
# Execute main()
if __name__=='__main__':
main()
Here is the same code with the only difference being that the variable dialog has been moved out of the function and into the global scope. This generates EVMSG_CHANGE messages whenever I click in the viewport/editor window.
import c4d
class CollectionManager(c4d.gui.GeDialog):
def CoreMessage(self, kind, data):
if kind == c4d.EVMSG_CHANGE:
print("Something changed")
return super(CollectionManager, self).CoreMessage(kind, data)
# Main function
dialog = CollectionManager()
def main():
dialog.Open(c4d.DLG_TYPE_ASYNC, 1040130)
# Execute main()
if __name__=='__main__':
main()
It might be something that don't quite understand but any help would be greatly appreciated.
Best Regards,
Alamgir Nasir