SaveWorldPreferences() in Python

Hi,

is there a chance, we could get SaveWorldPreferences() in Python.

I store some licensing info inside the prefs container. If a user now manages to crash C4D after having entered the license information for my plugin, the licensing info is lost and user needs to enter it again. I would have never imagined this to get an issue. But unfortunately I was wrong...

Would be cool to be able to save the prefs manually.

Cheers,
Andreas

Hello @a_block,

Thank you for reaching out to us. We have to discuss if we want to do this, but in the mean-time I would propose c4d.RestartMe() should this not be almost as good? You should be on the main thread when the license stuff is happening, so rebooting Cinema 4D should be no problem.

Sure, it will take a bit longer, but you can print "Be-ba-boop: Rebooting Cinema 4D ..." to make it cool 😉

Cheers,
Ferdinand

I had pretty mixed results with latest releases and use of RestartMe(). Somethings rings in the back of my head its use beeing discouraged.
And I think, a restart shouldn't be necessary at all. I'm even of the opinion restarting anything is almost neverr a good solution. Not even with "Be-ba-boop: Rebooting Cinema 4D...". I'd rather hope, to be able to simply save the prefs just like it is possible in the C++ SDK. So, I'll keep my fingers crossed and wait for the result of your discussion.

Hello @a_block,

We have discussed this, and we will add this function at some point, but I cannot give you an ETA. For now, you will have to live with either restarting Cinema 4D or with taking the risk of your data vanishing when Cinema 4D crashes.

Cheers,
Ferdinand

Hi Ferdinand,
thanks a lot!
No ETA needed, I'm grateful it will be added eventually.
Cheers,
Andreas