Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    PluginMessage(), SNHook, ReadPluginInfo()

    SDK Help
    0
    3
    280
    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 30/04/2008 at 13:03, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R10.111+ 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      My general question is when/if ReadPluginInfo() might be available/valid to call in during the plugin startup process...
      More specifically, I'd like to know if it's ok to call ReadPluginInfo() from inside the SNHookClass::SNCheck() method.  My SNHookClass-derived class is being registered when my PluginMessage() code recieves a C4DPL_INIT_SYS message, but it's not clear to me exactly when the SNCheck() is being called, although I deduce that it's sometime after registering my hook and before calling my PluginStart().
      On a similar and potentially related note, I am also now doing the resource.Init() just prior to registering the hook (on that C4DPL_INIT_SYS message), so that much is taken care of... I just need to know if it's ok to call ReadPluginInfo() from within SNCheck().
      Thanks,
      Keith

      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 01/05/2008 at 00:49, xxxxxxxx wrote:

        Hmmm... looks like the question may be moot.  Apparently, the serial number for your plugin IS STORED IN THE SAME PLACE Read/WritePluginInfo() USES...
        I guess I was just being dense, but when the SDK docs for ReadPluginInfo() says: "Read private serial information for a plugin." - it means it literally (same thing for WritePluginInfo()) - the plugin serial number passed to a SNHookClass::SNCheck() method is a String() stored there.
        Since I had been saving a structure-worth of some other data there in earlier compiles (I'm just now implementing the SNHook method), it didn't occur to me that the SDK doc text above was literal.
        Anyway, I guess that answers my initial question above (apparently ReadPluginInfo() would be a valid thing to do at that time within the startup), as well as answering the question of why I'm not getting a '0' regdate passed to my SNHook::SNCheck() method (I always get a '1' - which shouldn't normally happen, but I had other random data already stored with WritePluginInfo() for that PluginID).
        Just to clarify... I also just recently discovered the Get/SetWorldPluginData() routines and have switched most of my plugin options type data to use those instead, so I just need to fix this last remaining one.
        Suggestion for the SDK docs... have the docs for each of the above routines mention the others (ie. WritePluginInfo() docs should tell you about SetWorldPluginData() and visa-versa).

        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 01/05/2008 at 01:03, xxxxxxxx wrote:

          ...which I guess changes my initial question to:
          Can I (safely) call Get/SetWorldPluginData() from my SNHook-derived class' SNCheck() method? 😉

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