Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 46 files). Show all
Unified · Split
| @@ -116,6 +116,8 @@ void ScriptEngine::init() { · 115 unmodified lines | |||
| 116 | 116 | ||
| 117 | // register meta-type for glm::vec3 conversions | 117 | // register meta-type for glm::vec3 conversions |
| 118 | registerMetaTypes(&_engine); | 118 | registerMetaTypes(&_engine); |
| 119 | qScriptRegisterMetaType(&_engine, ParticlePropertiesToScriptValue, ParticlePropertiesFromScriptValue); | ||
| 120 | qScriptRegisterMetaType(&_engine, ParticleIDtoScriptValue, ParticleIDfromScriptValue); | ||
| 119 | 121 | ||
| 120 | QScriptValue agentValue = _engine.newQObject(this); | 122 | QScriptValue agentValue = _engine.newQObject(this); |
| 121 | _engine.globalObject().setProperty("Agent", agentValue); | 123 | _engine.globalObject().setProperty("Agent", agentValue); |
| @@ -164,7 +166,6 @@ void ScriptEngine::evaluate() { · 42 unmodified lines | |||
| 164 | } | 166 | } |
| 165 | 167 | ||
| 166 | QScriptValue result = _engine.evaluate(_scriptContents); | 168 | QScriptValue result = _engine.evaluate(_scriptContents); |
| 167 | qDebug("Evaluated script."); | ||
| 168 | 169 | ||
| 169 | if (_engine.hasUncaughtException()) { | 170 | if (_engine.hasUncaughtException()) { |
| 170 | int line = _engine.uncaughtExceptionLineNumber(); | 171 | int line = _engine.uncaughtExceptionLineNumber(); |
| @@ -179,8 +180,6 @@ void ScriptEngine::run() { · 8 unmodified lines | |||
| 179 | _isRunning = true; | 180 | _isRunning = true; |
| 180 | 181 | ||
| 181 | QScriptValue result = _engine.evaluate(_scriptContents); | 182 | QScriptValue result = _engine.evaluate(_scriptContents); |
| 182 | qDebug("Evaluated script"); | ||
| 183 | |||
| 184 | if (_engine.hasUncaughtException()) { | 183 | if (_engine.hasUncaughtException()) { |
| 185 | int line = _engine.uncaughtExceptionLineNumber(); | 184 | int line = _engine.uncaughtExceptionLineNumber(); |
| 186 | qDebug() << "Uncaught exception at line" << line << ":" << result.toString(); | 185 | qDebug() << "Uncaught exception at line" << line << ":" << result.toString(); |