Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    GetSubContainer() never called

    SDK Help
    0
    2
    242
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 15/07/2013 at 00:51, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14 
      Platform:    Mac  ;  
      Language(s) :     C++  ;

      ---------
      CommandData::GetSubContainer() is never called on my registered instance. I just can't figure out
      why it is not called.

      class TagCommander : public CommandData {
        
          typedef CommandData super;
        
      public:
        
          //| CommandData Overrides
        
        
          virtual Bool Execute(BaseDocument *doc) {
              GePrint(__PRETTY_FUNCTION__);
              return super::Execute(doc);
          }
        
          virtual Bool ExecuteSubID(BaseDocument *doc, LONG subid) {
              GePrint(__PRETTY_FUNCTION__);
              return super::ExecuteSubID(doc, subid);
          }
        
          virtual Bool ExecuteOptionID(BaseDocument *doc, LONG plugid, LONG subid) {
              GePrint(__PRETTY_FUNCTION__);
              return super::ExecuteOptionID(doc, plugid, subid);
          }
        
          virtual LONG GetState(BaseDocument *doc) {
              GePrint(__PRETTY_FUNCTION__);
              return super::GetState(doc);
          }
        
          virtual Bool GetSubContainer(BaseDocument *doc, BaseContainer &submenu) {
              GePrint(__PRETTY_FUNCTION__);
              return super::GetSubContainer(doc, submenu);
          }
        
          virtual Bool RestoreLayout(void *secret) {
              GePrint(__PRETTY_FUNCTION__);
              return super::RestoreLayout(secret);
          }
        
          virtual String GetScriptName(void) {
              GePrint(__PRETTY_FUNCTION__);
              return super::GetScriptName();
          }
        
          virtual Bool Message(LONG type, void *data) {
              GePrint(__PRETTY_FUNCTION__);
              return super::Message(type, data);
          }
        
      };
      
      virtual Bool TagCommander::Message(LONG, void * )
      virtual String TagCommander::GetScriptName()
      virtual LONG TagCommander::GetState(BaseDocument * )
      virtual Bool TagCommander::Message(LONG, void * )
      // Bunch of them ...
        
      virtual Bool TagCommander::Execute(BaseDocument * )
      virtual LONG TagCommander::GetState(BaseDocument * )
      virtual Bool TagCommander::Message(LONG, void * )
      // Bunch of them...
        
      virtual Bool TagCommander::ExecuteOptionID(BaseDocument *, LONG, LONG)
      

      I tried various PLUGINFLAG_COMMAND_ combinations, none worked. Does someone happen to
      know what I might be doing wrong?

      Thanks,
      -Nik

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 15/07/2013 at 03:57, xxxxxxxx wrote:

        I just figured this is an OSX problem. The exact same code compiles fine and actually works , meaning
        GetSubContainer() is called, on Windows. I'll file a bug report.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post