Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Signal for actual closing C4D (not C4DPL_ENDPROGRAM)

    Cinema 4D SDK
    c++
    2
    2
    542
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      victor
      last edited by

      I'm working on a plugin that needs to free some resources as well as closing a TCP connection, unfortunatly you cannot rely on C4DPL_ENDPROGRAM since if your scene is not saved and try to close c4d that signal is trigged but you still can click on Cancel so the app is not closed and you could have freed your resources.

      Any thought on this? Thank you in advance.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @victor, C4DPL_ENDPROGRAM is called really at the end of Cinema 4D just before it quits. It's most likely that you search for C4DPL_ENDACTIVITY which is sent before any PluginEnd so it's the place to free the resources.
        For more information see Plugin Functions Manual: Shutdown.

        If you have any questions, please let me know.
        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • First post
          Last post