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

    Plugin upgrade to SDK10

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 261 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 13/07/2007 at 04:26, xxxxxxxx wrote:

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

      ---------
      Hi all,

      I have a command plugin written under the SDK9.1. Now, I want to upgrade SDK 10.

      I have the plugin and an other application (APP), which communicates the plugin via a dump file. Always the APP starts the communication, APP calls the maxon and sends the path where the plugin can find the dump file.

      This is the my plugin class:

        
      class Exchange : public CommandData  
      {  
          public:  
              virtual Bool Execute(BaseDocument *doc);  
        
              virtual void Message(const BaseContainer &msg;);  
      };  
      

      and implementation of Message:

        
      void Exchange::Message(const BaseContainer &msg;)  
      {  
          String mess;  
          String cmdline = msg.GetString(0); // <-- here get the path!!  
        
          // DocPath and TmpPath  
          CHAR tmpPathBuffer[1024]   = { 0 };  
        
          // UNITS  
          LONG pos = 0;  
          LONG unit = 0; // default -> no unit  
          // "@" behind the path ?  
          if ( cmdline.FindLast( "@", &pos; ) )  
          {  
              // space behind the "@" ?  
              if ( pos+1 < cmdline.GetLength() )  
              {  
                  // get unit from string  
                  String strUnit = cmdline.SubStr( pos+1, cmdline.GetLength()-pos-1 );  
                  unit = strUnit.StringToLong();  
              }  
        
              // clean path by cutting off the unit  
              cmdline = cmdline.SubStr( 0, pos );  
          }  
        
          // get paths from command string  
          cmdline.GetCString( tmpPathBuffer, 1024 );  
        
          // and so on..  
      }  
      

      And my problem is
      void CommandData::Message(BaseContainer& msg) was changed to LONG CommandData::Message(LONG type, void* data)
      Now, how can I get the message which contains the path?

      Thanx,
      and have a nice day.

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 13/07/2007 at 08:25, xxxxxxxx wrote:

        Hi,

        you must type cast the void pointer to the according data (or to CommandInfoData) and check what message has been sent I assume. Maybe you can also directly cast the pointer to a BaseContainer.

        It´s looong time I created a CommandData plugin so this is all just guessed (but you definetly need to type cast the pointer, that´s for sure).

        Maybe the support can help.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 14/07/2007 at 04:51, xxxxxxxx wrote:

          Thanx again, works fine...

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