R13 Python Script Reload



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/09/2011 at 03:08, xxxxxxxx wrote:

    Hi,

    I think there is a little poor effect in R13 new function of python script reload. Existings sockets and threats will not reseted. Or is there an event available on which a plugin can do it itself if the plugin will be unload?

    Meinolf



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/09/2011 at 06:02, xxxxxxxx wrote:

    Hi, the documentation will be available soon. The reload stuff must be done by the plugin, this cannot be solved by the reload command. In your main file add the following lines and shutdown all the services:

      
    def PluginMessage(id, data) :  
      if id==c4d.C4DPL_RELOADPYTHONPLUGINS:  
          ShutdownAllYourStuff() #shutdown all services, sockets, listener, ...  
          return True  
      return False  
    

    If you have have a socket server you can also handle C4DPL_ENDACTIVITY to shutdown the services properly when C4D is closed.

    Cheers, Sebastian



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/09/2011 at 10:04, xxxxxxxx wrote:

    Thx!
    Meinolf


Log in to reply