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
    • Recent
    • Tags
    • Users
    • Login

    GvOperatorData

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 456 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 27/02/2011 at 14:26, xxxxxxxx wrote:

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

      ---------
      I am trying to write and register an xpresso node plugin.  Here is what I have so far.  I am starting simple just to see if I can get something to compile.   I am running in to a problem because under the GvRegisterOperatorPlugin()   The fourth argument requires an allocation of some sort.  I try MyClass->Alloc() but Alloc() is not a member of GvOperatorData()..    Does anyone know what I should put there?

      Thanks,

      Shawn

        
        
      #include "c4d.h"  
      #include "c4d_operatordata.h"  
      #include "myClass.h"  
        
      class MyClass : public GvOperatorData{  
        
      public:  
        virtual Bool Init(GeListNode* node);  
        
        
      };  
        
      //Init Function  
      Bool MyClass::Init(GeListNode *node){  
        
       return TRUE;  
      }  
        
      Bool RegisterMyClass(void){  
        
       return GvRegisterOperatorPlugin(ID_NPARTICLE_NODE, "MyClass", PLUGINFLAG_SMALLNODE, MyClass::Alloc(), "MyClass", 0, ID_GV_OPCLASS_TYPE_GENERAL, ID_GV_OPGROUP_TYPE_GENERAL, 0, AutoBitmap("MyClass.tif"));  
        
      }  
        
      
      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 27/02/2011 at 14:37, xxxxxxxx wrote:

        Maybe I can only repeat myself but search the forum. there is a full example available (if not several).

        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 27/02/2011 at 15:33, xxxxxxxx wrote:

          Maybe i wasn't clear.  I HAVE searched the forums and all results show to use GvOperatorData::Alloc for that argument  or more specifically the class which inherits GvOperatorData.   I am doing that but it doesn't work.

          I was trying to use this example:

          https://developers.maxon.net/forum/topic/3916/3386_baseobjects-and-objectlinkports&KW=GvRegisterOperatorPlugin&PID=13868#13868

          but the sdk for r12 says that there is no Alloc() in GvOperatorData. 
          This is why I am asking.  🙂

          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 27/02/2011 at 16:22, xxxxxxxx wrote:

            Any other examples that use GvRegisterOperatorPlugin() use the GvOperatorData::Alloc() for that argument so My question is, has this changed in the SDK?  Or is there a different way to do it?

            Thanks,

            Shawn

            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 27/02/2011 at 16:35, xxxxxxxx wrote:

              Problem Solved.

              My mistake..  I cut out too much when shelling out my simple example...

              I left out...
              static NodeData* Alloc(void) { return gNew MyClass; }

              to the class methods.  🙂

              The problem is solved.

              Proof still that my forum searching skills are still in tact.  🙂

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