How to reload the resource? [CLOSED]
-
On 09/07/2015 at 09:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :---------
Hi! How can we reload the resource of a plugin library so that it will affect the registered plugins? There's
GeResource::ReloadResource(), but that does not seem to work the way I expected it to.Bool PluginMessage(Int32 type, void* pData) { switch (type) { case C4DPL_INIT_SYS: return ::resource.Init(); case MSGPL_RELOADRESOURCE: GePrint("Reloading Resource"); return ::resource.ReloadResource(); } return false; }
import c4d MSGPL_RELOADRESOURCE = 1035545 c4d.GePluginMessage(MSGPL_RELOADRESOURCE, None)
The message is received when I run the Python script, but the reload does not seem to have any effect.
Description resources are still the same as they were loaded the first time the plugin object was created.
My goal is to not require to close and re-open Cinema 4D for every change to the description resource.Thanks!
Niklas -
On 10/07/2015 at 05:08, xxxxxxxx wrote:
Hi Niklas,
ReloadResource() is not only marked private, but we also need to strongly disadvise using this function. It could have potentially harmful effects.
Even worse, I'm not aware of any option to reload descriptions. Sorry. -
On 10/07/2015 at 05:45, xxxxxxxx wrote:
you have to use GetDDescription()
-
On 11/07/2015 at 06:27, xxxxxxxx wrote:
Hi! I somehow thought that descriptions would be reloaded for Python
Plugins when you "Reload Python Plugins". But that only counts for
dialog resources Is there a way at least to reload them for C++ plugins
as well? Since you disadvise me to use ReloadResource(), I don't see
another way, besides maybe calling Init()?Thanks,
Niklas -
On 13/07/2015 at 04:48, xxxxxxxx wrote:
Sorry, Niklas, we are not aware there's any option to reload description resources.