RegisterSceneHookPlugin ( brain fart )



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

    On 06/08/2003 at 09:14, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.100 
    Platform:      
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    I had used SceneHook plugins back in v7. Went to code a little helper in v8.2 and keep receiving the "does not match" the function declared by the SDK.   Maybe it is sleep depravation but I cannot see the forest for the trees. I kept simplifying the code until, well, it couldn't get much simpler. Any ideas?

    class SCENEHOOKPLUGIN : public SceneHookData
         {
              public:
           virtual LONG Execute ( PluginSceneHook* node, BaseDocument* doc, BaseThread* bt, LONG priority, LONG flags );
         };

    LONG SCENEHOOKPLUGIN :: Execute ( PluginSceneHook* node, BaseDocument* doc, BaseThread* bt, LONG priority, LONG flags)
         {
              return EXECUTION_RESULT_OK;
         }

    Bool Register_SCENEHOOKPLUGIN ( void )
         {
              return RegisterSceneHookPlugin( 0000000, "SCENEHOOKPLUGIN", 0, gNew SCENEHOOKPLUGIN, EXECUTION_INITIAL, 0 );
         }

    // Bool RegisterSceneHookPlugin( LONG id, const String &str;, LONG info, DataAllocator *g, LONG priority, LONG disklevel, void *emulation=NULL);

    Thanks for any help,
    David Farmer



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

    On 06/08/2003 at 14:40, xxxxxxxx wrote:

    Hi Darf,
    try it like this (this works for me)
    class definition add:
    static NodeData *Alloc(void) { return gNew DARFSCENEHOOK; }
    registration:
     return RegisterSceneHookPlugin(111111111, "Darfs Scenehook", PLUGINFLAG_SCENEHOOK_NOTDRAGGABLE, 
      DARFSCENEHOOK::Alloc, EXECUTION_RESULT_OK, 0, NULL);
    HTH
    Best
    Samir


Log in to reply