Hi @bentraje, hi @C4DS,
you seem to have solved your problem yourself, so there is not much for me to add here apart from offering alternative solutions. One slightly dodgy way to get the preferences path is to use the path which is stored under c4d.PREF_MEMORY_PVHARDFOLDER
in the world container of Cinema (it is the Memory>Cache Path
attribute).
A more elegant way is to use maxon.Application.GetUrl()
which does properly handle the different paths under which the preferences can be stored (see example at the end of my posting for details).
Cheers,
Ferdinand
"""On how to iterate over the different preferences paths with the maxon API.
"""
import maxon
def main():
"""Entry point.
"""
for urlType in (maxon.APPLICATION_URLTYPE.GLOBALPREFS_DIR,
maxon.APPLICATION_URLTYPE.PREFS_DIR,
maxon.APPLICATION_URLTYPE.PREFS_DIR_STATIC):
print (f"{urlType}:{maxon.Application.GetUrl(urlType)}")
if __name__=='__main__':
main()