Skip to main content

GUI

General

  • In Plugin Context. Every CommandData does not need to have a GeDialog. But every GeDialog needs a CommandData.
  • When adding entries to a custom menu via the GetSubContainer function of the commandData class
  • When you want to update the menu outside of C4DPL_BUILDMENU, you must call c4d.gui.UpdateMenus() after the changes.
  • doc.GetActiveToolData()
  • Please note that you can NOT update/modify the GUI from within a thread; you must defer GUI updates to the main thread.

Plugin

  • If each script is inside the c4d scripts dir
    • The benefice of the last decision is that Cinema 4D will load these scripts and create a CommandData for each of them dynamically
  • according to the documentation the Message from CommandData responds to messages of type MSG_COMMAND
  • CommandData trigger from GeDialog. A GeUserArea can trigger its parent GeDialog via a SendParentMessage which needs to be handled in GeDialog::Command.
  • To communicate with your dialog just send a SpecialEventAdd() message with a unique plugin ID from your tag and catch the message in GeDialog::CoreMessage().