Clear coffeesymbolcache?

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

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,

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

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,

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   

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