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

    RegisterSceneHookPlugin ( brain fart )

    SDK Help
    0
    2
    208
    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
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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

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