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

    Stuck on building basic first plugin

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 266 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 11/04/2008 at 11:53, xxxxxxxx wrote:

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

      ---------
      If anyone wouldn't mind helping me understand this error, it would be hugely appreciated.

      Here's the plugin source file:

      > <code>#include "c4d.h"
      >
      > class MyTagPlugin : public TagData
      > {
      >      public:
      >           virtual Bool Init(GeListNode *node);
      >           virtual LONG Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags);
      >
      >           static NodeData *Alloc(void) { return gNew MyTagPlugin; }
      > }
      >
      > Bool MyTagPlugin::Init(GeListNode *node)
      > {
      > #
      > # ERROR HAPPENS HERE (says XCode) : "error: expected initializer before 'MyTagPlugin'
      > #
      >      //BaseTag *tag = (BaseTag* )node;
      >      //BaseContainer *data = tag->GetDataInstance();
      >      return TRUE
      > }
      >
      > LONG MyTagPlugin::Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags)
      > {
      >      GePrint("Executing!!");
      >      
      >      return EXECUTION_RESULT_OK;
      > }
      >
      > #define ID_MYTAGPLUGIN 10000001
      > Bool RegisterMyTagPlugin(void)
      > {
      >      return RegisterTagPlugin(ID_MYTAGPLUGIN,"MyTagName",TAG_EXPRESSION|TAG_VISIBLE,MyTagPlugin::Alloc,"","",0);
      > }
      > </code>

      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 11/04/2008 at 12:00, xxxxxxxx wrote:

        A semicolon after "return TRUE" would help! There should also be one at the end of the class definition:

        class MyTagPlugin : public TagData
        {
             public:
                  virtual Bool Init(GeListNode *node);
                  virtual LONG Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags);

        static NodeData *Alloc(void) { return gNew MyTagPlugin; }
        };

        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 11/04/2008 at 12:02, xxxxxxxx wrote:

          Well son of a b... I was so wrapped up getting the API stuff I missed the simple. Thanks again, built fine!

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