Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    Main thread entry

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 305 Views
    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.
    • H Offline
      Helper
      last edited by

      On 03/04/2015 at 19:09, xxxxxxxx wrote:

      Hello,

      another one…
      I managed to handle several tasks in several threads, while the original task in the main thread is already finished.
      Is there a way to enter the main thread again and if not, is it possible to start a new script from a running script ?

      Thanks in advance
      Martin

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 07/04/2015 at 06:40, xxxxxxxx wrote:

        Hi Martin,

        you can use SpecialEventAdd() in your thread and then have e.g. a MessageData plugin to receive the event, which will then be in the main thread again.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 09/04/2015 at 02:57, xxxxxxxx wrote:

          Hi Andreas,

          thanks for the hint !  I´ll give it a try.
          It seems to take a little longer, but I´ll report if I can handle it.

          Best wishes
          Martin

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 11/05/2015 at 12:47, xxxxxxxx wrote:

            Hi Andreas,

            the solution with a message data plugin works quite well. Thanks!
            Some notes: It´s a little tricky to find the right timing guaranteeing that every other thread can start.
            And more important keeping track of your threads to end them accordingly, otherwise they will run as long as you shut down your system.

            Best wishes
            Martin

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