Replaced the Avatar in Agent by a scriptable avatar.

This commit is contained in:
Atlante45 2014-07-23 14:00:49 -07:00
parent 4b867de864
commit 95c98203a9
2 changed files with 4 additions and 1 deletions

View file

@ -29,6 +29,8 @@
#include <ParticlesScriptingInterface.h> // TODO: consider moving to scriptengine.h
#include <ModelsScriptingInterface.h> // TODO: consider moving to scriptengine.h
#include "avatars/ScriptableAvatar.h"
#include "Agent.h"
Agent::Agent(const QByteArray& packet) :
@ -228,7 +230,7 @@ void Agent::run() {
qDebug() << "Downloaded script:" << scriptContents;
// setup an Avatar for the script to use
AvatarData scriptedAvatar;
ScriptableAvatar scriptedAvatar(&_scriptEngine);
// call model URL setters with empty URLs so our avatar, if user, will have the default models
scriptedAvatar.setFaceModelURL(QUrl());

View file

@ -59,6 +59,7 @@ public:
QScriptEngine* getEngine() { return &_engine; }
ArrayBufferClass* getArrayBufferClass() { return _arrayBufferClass; }
AnimationCache* getAnimationCache() { return &_animationCache; }
/// sets the script contents, will return false if failed, will fail if script is already running
bool setScriptContents(const QString& scriptContents, const QString& fileNameString = QString(""));