Check for break in Message(..)



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

    On 01/09/2011 at 21:12, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   12 
    Platform:      
    Language(s) :     C++  ;

    ---------
    Hy there,

    is it possible to check for a user break in a TagData::Message(..) hook? I don't know how I can retrieve the thread in the hook ...

    I do some caching when a button is clicked and right now the user needs to wait till its finished.

    Thank you,
    maxx



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

    On 02/09/2011 at 01:01, xxxxxxxx wrote:

    Sounds rather dangerous to me to let the caching running in the background. What if the user deletes the tag for instance while caching? In any case I think you need to start your own thread.

    cheers,
    Matthias



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

    On 02/09/2011 at 07:47, xxxxxxxx wrote:

    Hmm, what do you mean by running the caching in the background?

    I do the caching in the Message(..) method, which actually blocks Cinema till I return. So, in the Message callback I then let the time for the document advance and record keys for my tag. During that time, the user can't do anything right now. That is actually fine, but the user should be able to stop the caching, for example through pressing ESC.

    How can I do this correctly?

    Thank you,
    maxx



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

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

    Ah, do you just want to catch a user input, like pressing ESC, to exit a while loop? Then please take a look at the "Input events" chapter of the SDK docs.

    cheers,
    Matthias



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

    On 02/09/2011 at 09:17, xxxxxxxx wrote:

    Cool, thanks for the info.

    Cheers,
    maxx


Log in to reply