RegisterSceneLoaderPlugin
-
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?
-
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