Model scripting
Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 15 files). Show all
Unified · Split
| @@ -65,6 +65,8 @@ · 64 unmodified lines | ||
| 65 | 65 | #include "RecordingScriptingInterface.h" |
| 66 | 66 | #include "ScriptEngines.h" |
| 67 | 67 | #include "TabletScriptingInterface.h" |
| 68 | +#include "ModelScriptingInterface.h" | |
| 69 | + | |
| 68 | 70 | |
| 69 | 71 | #include <Profile.h> |
| 70 | 72 | |
| @@ -594,7 +596,7 @@ void ScriptEngine::init() { · 523 unmodified lines | ||
| 594 | 596 | registerGlobalObject("Messages", DependencyManager::get<MessagesClient>().data()); |
| 595 | 597 | |
| 596 | 598 | registerGlobalObject("File", new FileScriptingInterface(this)); |
| 597 | − | |
| 599 | + | |
| 598 | 600 | qScriptRegisterMetaType(this, animVarMapToScriptValue, animVarMapFromScriptValue); |
| 599 | 601 | qScriptRegisterMetaType(this, resultHandlerToScriptValue, resultHandlerFromScriptValue); |
| 600 | 602 | |
| @@ -612,6 +614,10 @@ void ScriptEngine::init() { · 11 unmodified lines | ||
| 612 | 614 | registerGlobalObject("Resources", DependencyManager::get<ResourceScriptingInterface>().data()); |
| 613 | 615 | |
| 614 | 616 | registerGlobalObject("DebugDraw", &DebugDraw::getInstance()); |
| 617 | + | |
| 618 | + registerGlobalObject("Model", new ModelScriptingInterface(this)); | |
| 619 | + qScriptRegisterMetaType(this, meshToScriptValue, meshFromScriptValue); | |
| 620 | + qScriptRegisterMetaType(this, meshesToScriptValue, meshesFromScriptValue); | |
| 615 | 621 | } |
| 616 | 622 | |
| 617 | 623 | void ScriptEngine::registerValue(const QString& valueName, QScriptValue value) { |