Could someone please help me with a working example of CommandData.ExecuteOptionID()? I was unable to find one online and I find the documentation confusing. I would like to transfer the data from a GeDialog storing Options to my CommandData plugin. What would this look like?
ExectuteOptionID() accepts subid as an argument, which is described as such:
subid (int) – Only available for plugins that have sub-IDs (which normally are called using ExecuteSubID().
In ExecuteSubID(), it then says:
Override - Execute the command plugin with the subid that was given by GetSubContainer().
Is this saying that I need to also call GetSubContainer()? How does this work?
What I Have So Far
class Options_Dlg(c4d.gui.GeDialog): # options data, CreateLayout, etc.
def ExecuteOptionID(self, doc, plugid, subid): dlg = Options_Dlg() dlg.Open(c4d.DLG_TYPE_MODAL, defaultw=300, defaulth=150) return True
Registering the Command Plugin...
c4d.plugins.RegisterCommandPlugin(id=CMD_PLUGIN_ID, str="Plugin Name", info=c4d.PLUGINFLAG_COMMAND_OPTION_DIALOG | c4d.PLUGINFLAG_COMMAND_HOTKEY |c4d.PLUGINFLAG_HIDEPLUGINMENU, help="Help text.", dat=MyCommandData(), icon=None)