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

    RegisterSceneLoaderPlugin

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 234 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 22/04/2010 at 08:30, xxxxxxxx wrote:

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

      ---------
      I'm just learning to create my plugin for importing blender fluids, but I can't get over this error:

      Bool RegisterFluidPlugin(void)  
      {      
        if(!RegisterSceneLoaderPlugin(ID_FLUIDPLUGIN, "Fluid Plugin", PLUGINFLAG_SCENELOADER_MERGEORIGINAL, gNew FluidPlugin, "Fluid Plugin")) return FALSE;  
        return TRUE;  
      }  
      

      error C2664: 'RegisterSceneLoaderPlugin' : cannot convert parameter 4 from 'FluidPlugin *' to 'DataAllocator (__cdecl * )'

      Does anyone knows how do I fix this?

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

        Please check the stl.cpp file in the SDK examples for a SceneLoaderData plugin example.

        In short you have to pass a function pointer to an allocation method of the class.

          
        class STLLoaderData : public SceneLoaderData  
        {  
          public:  
          
        ...  
          
              static NodeData *Alloc(void) { return gNew STLLoaderData; }  
          
        ...  
        };  
          
          
        if (!RegisterSceneLoaderPlugin(1000984,name,0,STLLoaderData::Alloc,String(),NULL)) return FALSE;  
        

        cheers,
        Matthias

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