Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 42 files). Show all
Unified · Split
| @@ -22,7 +22,7 @@ · 21 unmodified lines | ||
| 22 | 22 | #include <AudioRingBuffer.h> |
| 23 | 23 | #include <AvatarData.h> |
| 24 | 24 | #include <CollisionInfo.h> |
| 25 | −#include <ModelsScriptingInterface.h> | |
| 25 | +#include <EntityScriptingInterface.h> | |
| 26 | 26 | #include <NodeList.h> |
| 27 | 27 | #include <PacketHeaders.h> |
| 28 | 28 | #include <ParticlesScriptingInterface.h> |
| @@ -39,7 +39,7 @@ · 10 unmodified lines | ||
| 39 | 39 | |
| 40 | 40 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; |
| 41 | 41 | ParticlesScriptingInterface ScriptEngine::_particlesScriptingInterface; |
| 42 | −ModelsScriptingInterface ScriptEngine::_modelsScriptingInterface; | |
| 42 | +EntityScriptingInterface ScriptEngine::_entityScriptingInterface; | |
| 43 | 43 | |
| 44 | 44 | static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) { |
| 45 | 45 | QUrl soundURL = QUrl(context->argument(0).toString()); |
| @@ -227,10 +227,10 @@ void ScriptEngine::init() { · 181 unmodified lines | ||
| 227 | 227 | qScriptRegisterMetaType(&_engine, ParticleIDtoScriptValue, ParticleIDfromScriptValue); |
| 228 | 228 | qScriptRegisterSequenceMetaType<QVector<ParticleID> >(&_engine); |
| 229 | 229 | |
| 230 | − qScriptRegisterMetaType(&_engine, ModelItemPropertiesToScriptValue, ModelItemPropertiesFromScriptValue); | |
| 231 | − qScriptRegisterMetaType(&_engine, ModelItemIDtoScriptValue, ModelItemIDfromScriptValue); | |
| 232 | − qScriptRegisterMetaType(&_engine, RayToModelIntersectionResultToScriptValue, RayToModelIntersectionResultFromScriptValue); | |
| 233 | − qScriptRegisterSequenceMetaType<QVector<ModelItemID> >(&_engine); | |
| 230 | + qScriptRegisterMetaType(&_engine, EntityItemPropertiesToScriptValue, EntityItemPropertiesFromScriptValue); | |
| 231 | + qScriptRegisterMetaType(&_engine, EntityItemIDtoScriptValue, EntityItemIDfromScriptValue); | |
| 232 | + qScriptRegisterMetaType(&_engine, RayToEntityIntersectionResultToScriptValue, RayToEntityIntersectionResultFromScriptValue); | |
| 233 | + qScriptRegisterSequenceMetaType<QVector<EntityItemID> >(&_engine); | |
| 234 | 234 | |
| 235 | 235 | qScriptRegisterSequenceMetaType<QVector<glm::vec2> >(&_engine); |
| 236 | 236 | qScriptRegisterSequenceMetaType<QVector<glm::quat> >(&_engine); |
| @@ -257,7 +257,7 @@ void ScriptEngine::init() { · 20 unmodified lines | ||
| 257 | 257 | registerGlobalObject("Script", this); |
| 258 | 258 | registerGlobalObject("Audio", &_audioScriptingInterface); |
| 259 | 259 | registerGlobalObject("Controller", _controllerScriptingInterface); |
| 260 | − registerGlobalObject("Models", &_modelsScriptingInterface); | |
| 260 | + registerGlobalObject("Entities", &_entityScriptingInterface); | |
| 261 | 261 | registerGlobalObject("Particles", &_particlesScriptingInterface); |
| 262 | 262 | registerGlobalObject("Quat", &_quatLibrary); |
| 263 | 263 | registerGlobalObject("Vec3", &_vec3Library); |
| @@ -403,13 +403,13 @@ void ScriptEngine::run() { · 139 unmodified lines | ||
| 403 | 403 | } |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | − if (_modelsScriptingInterface.getModelPacketSender()->serversExist()) { | |
| 406 | + if (_entityScriptingInterface.getEntityPacketSender()->serversExist()) { | |
| 407 | 407 | // release the queue of edit voxel messages. |
| 408 | − _modelsScriptingInterface.getModelPacketSender()->releaseQueuedMessages(); | |
| 408 | + _entityScriptingInterface.getEntityPacketSender()->releaseQueuedMessages(); | |
| 409 | 409 | |
| 410 | 410 | // since we're in non-threaded mode, call process so that the packets are sent |
| 411 | − if (!_modelsScriptingInterface.getModelPacketSender()->isThreaded()) { | |
| 412 | − _modelsScriptingInterface.getModelPacketSender()->process(); | |
| 411 | + if (!_entityScriptingInterface.getEntityPacketSender()->isThreaded()) { | |
| 412 | + _entityScriptingInterface.getEntityPacketSender()->process(); | |
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | |
| @@ -524,13 +524,13 @@ void ScriptEngine::run() { · 108 unmodified lines | ||
| 524 | 524 | } |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | − if (_modelsScriptingInterface.getModelPacketSender()->serversExist()) { | |
| 528 | − // release the queue of edit voxel messages. | |
| 529 | − _modelsScriptingInterface.getModelPacketSender()->releaseQueuedMessages(); | |
| 527 | + if (_entityScriptingInterface.getEntityPacketSender()->serversExist()) { | |
| 528 | + // release the queue of edit entity messages. | |
| 529 | + _entityScriptingInterface.getEntityPacketSender()->releaseQueuedMessages(); | |
| 530 | 530 | |
| 531 | 531 | // since we're in non-threaded mode, call process so that the packets are sent |
| 532 | − if (!_modelsScriptingInterface.getModelPacketSender()->isThreaded()) { | |
| 533 | − _modelsScriptingInterface.getModelPacketSender()->process(); | |
| 532 | + if (!_entityScriptingInterface.getEntityPacketSender()->isThreaded()) { | |
| 533 | + _entityScriptingInterface.getEntityPacketSender()->process(); | |
| 534 | 534 | } |
| 535 | 535 | } |
| 536 | 536 | |