On 09/01/2017 at 04:27, xxxxxxxx wrote:
Hi Peterakos, thanks for writing us.
With reference to your first question, there are a few utility calls that might be worth looking to obtain certain threads:
- GeGetCurrentThreadId(): returns the unique ID for the current thread;
- GeGetCurrentThread(): returns the current BaseThread. This BaseThread can be passed to functions that require a BaseThread argument to check for stop conditions;
- GeGetDummyThread(): returns a dummy thread. This may be used when a BaseThread argument must be set;
- GeGetEscTestThread(): returns a thread for escape key testing. This may be used when a BaseThread argument must be set.
With reference to your second question, well I'd say it strongly depends on what you expect to process so better circumstancing your question will be helpful. In BakeTexture, for example, passing the object returned by the GeGetEscTestThread() will provide you with some helpful means to interrupt the baking computation by pressing Esc.