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

    Deleting/clearing PluginInfo

    Cinema 4D SDK
    c++
    2
    3
    384
    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.
    • fwilleke80F
      fwilleke80
      last edited by fwilleke80

      Hi,

      what's the best way to clear data stored via WritePluginInfo()?

      Should I

      • Write 1 Byte of anything, hoping that the complete data that used to sit there will be cleared?
      • Write n Bytes of anything, definitely overwriting the complete data that used to sit there (this is what I currently do)?
      • Do something entirely different?

      Thanks for tips!

      Greetings,
      Frank

      www.frankwilleke.de
      Only asking personal code questions here.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi, @fwilleke80 you are right there is no built-in way to correctly delete all the data.
        However, as you stated writing 1Byte of anything is enough since it will replace the whole content.

        Now if you really want to delete the generated data, WritePluginInfo does the next things:

        • On Windows, data is stored in the registry.
          • The directory used is HKEY_CURRENT_USER\SOFTWARE\MC4D but if it fails then HKEY_LOCAL_MACHINE\SOFTWARE\MC4D is used.
          • The registry key used is VERSION_REGISTRYNAME_pluginID.
            VERSION_REGISTRYNAME is generated for each major version and differs for each build like Cineware, c4dpy.
            For R21 it's c4d21
        • On Mac, the pref folder will be used.
          • A file called VERSION_REGISTRYNAME_pluginID will be created and store the data.
            VERSION_REGISTRYNAME is generated for each major version and differs for each build like Cineware, c4dpy.
            For R21 it's c4d21

        VERSION_REGISTRYNAME is similar on both Windows and Mac.
        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • fwilleke80F
          fwilleke80
          last edited by

          Super, thank you!!

          www.frankwilleke.de
          Only asking personal code questions here.

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