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

    Clear coffeesymbolcache?

    PYTHON Development
    0
    6
    657
    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 28/06/2011 at 12:57, xxxxxxxx wrote:

      When adding new attribute ID's (AM controllers) to a plugin (Tag plugin in this case)
      the new ID's are not in the coffeesymbolcache file, thus are missing.
      I can delete the coffeecache and it's all fine next start of Cinema.

      How can I handle this automatically, is there a routine for this?

      Cheers
      Lennart

      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 28/06/2011 at 13:01, xxxxxxxx wrote:

        create a *.pyp file in your plugins folder which deletes the cache-file.

        from    os  import remove  
        path = "{MyPath2Coffesymbolcache}"  
        try:  
          remove(path)  
        except:  
          pass
        

        Cheers,

        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 28/06/2011 at 23:01, xxxxxxxx wrote:

          Hm, could do, but afaik the file is only rewritten when you close/restart
          Cinema.
          A simple test I did, I trashed the file manually while Cinema was running,
          then opened my updated plugin and the ID was missing...
          It can't be that every plugin dev trash that file for every update, can it?

          Cheers
          Lennart

          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 29/06/2011 at 03:53, xxxxxxxx wrote:

            It works fine here.
            All plugins are initialized first and *then* the coffeesymbolcache is written.

            Cheers,

            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 29/06/2011 at 15:40, xxxxxxxx wrote:

              Thanks Niklas.
              It does work, but it seems very brutal, doesn't it?

              For a, hopefully, platform independent clean up i now run
              (in a file called *.pyp placed in my plugins folder)

              Anyone running Windows dear to test ! 🙂
              You should see that the "coffeesymbolcache" file gets a
              new creation date.

              I'll see if I add a deletion routine in my own plugin at
              init (opening the plugin) to clear the *pyp file not to
              clear at every new start up of Cinema.

              Sebastian, Matthias, am I on the right track here?

              Cheers
              Lennart

                
              import os   
              from os import remove   
              import c4d   
              from c4d import storage   
                
              path = c4d.storage.GeGetC4DPath(c4d.C4D_PATH_PREFS)   
              path = os.path.join(path,'coffeesymbolcache')   
                
              try:   
                  remove(path)   
              except:   
                  pass   
              
              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 29/06/2011 at 16:33, xxxxxxxx wrote:

                And by messing with symbols I need to use the number 1 (instead of C4D_PATH_PREFS) in the pyp file
                as symbols are trashed.... oh my..

                Cheers
                Lennart

                  
                import os   
                from os import remove   
                import c4d   
                from c4d import storage   
                  
                path = c4d.storage.GeGetC4DPath(1)   
                path = os.path.join(path,'coffeesymbolcache')   
                  
                try:   
                    remove(path)   
                except:   
                    pass   
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post