GeGetEscTestThread



  • 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! :)



  • 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.



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

    This is what I was confused about.

    Thanks for clarification! :)


Log in to reply