![]() |
The SM_Promise class can be used to unblock the ScriptModule and allow other nodes to render by promising a CEL via a callback function when it is complete. The job will wait until the watchPath is available (a new file on disk). Once this path has been created, the completeFunction is called and the cel can be set. Note, the complete function must be thread-safe and not access any data from the scene – it should only be used to set the cel. More...
Public Slots | |
void | set (const String &watchPath, int timeout, QScriptValue completeFunction, QScriptValue timeoutFunction) |
void | reset () |
const String & | getWatchPath () const |
The path to the cel that is promised as a result to the script module. More... | |
int | getTimeout () const |
The timeout – at which point the timeout function will be called. More... | |
QScriptValue | getTimeoutFunction () const |
QScriptValue | getCompleteFunction () const |
bool | getPromiseSet () const |
void | promiseFinished () |
Reset the promise. More... | |
Properties | |
String | watchPath |
The data file that will be watched. Once its available, the cel will be loaded. More... | |
int | timeout |
Timeout. More... | |
The SM_Promise class can be used to unblock the ScriptModule and allow other nodes to render by promising a CEL via a callback function when it is complete. The job will wait until the watchPath is available (a new file on disk). Once this path has been created, the completeFunction is called and the cel can be set. Note, the complete function must be thread-safe and not access any data from the scene – it should only be used to set the cel.
The timeout function is called when the render times out (based on the supplied timeout argument), and is called with a boolean argument identifying if it has cancelled by the application. Ie: function timeOut( cancelled ){...}
|
slot |
|
inlineslot |
|
slot |
The timeout – at which point the timeout function will be called.
|
slot |
|
slot |
The path to the cel that is promised as a result to the script module.
|
slot |
Reset the promise.
|
slot |
|
slot |
|
read |
Timeout.
|
read |
The data file that will be watched. Once its available, the cel will be loaded.