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

    GeGetEscTestThread

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 312 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 29/06/2016 at 07:22, xxxxxxxx wrote:

      Hi there,

      is there any information (a practical example) available that explains GeGetEscTestThread() along with GeGetDummyThread()?

      Thankies! 🙂

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

        On 30/06/2016 at 08:01, xxxxxxxx wrote:

        Hi,

        in general these functions are convenience functions.
        And actually the documentation is not quite right here, thanks for bringing this up. This will be fixed with one of the next documentation updates.

        In Cinema 4D many functions (e.g. LoadDocument()) get passed a thread as parameter. Internally this is used to call TestBreak() to cancel longer lasting operations for example on user interaction.

        The two functions just return empty threads with a certain TestBreak() behavior.
        GeGetDummyThread(): TestBreak() always returns false. So the operation, which gets passed this thread, won't be cancelled.
        GeGetEscTestThread(): Here the docs are wrong. TestBreak() will return true, if the user presses the Esc key. So the operation, which gets passed this thread, will be cancelled, when the user presses Esc.

        Please note, that GeGetEscTestThread() is not hundred percent bullet proof, so it may miss a keypress.

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

          On 30/06/2016 at 10:03, xxxxxxxx wrote:

          This is what I was confused about.

          Thanks for clarification! 🙂

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