Showing the changes to interface/src/Application_Setup.cpp (1 of 38 files). Show all
Unified · Split
| @@ -86,6 +86,7 @@ · 85 unmodified lines | ||
| 86 | 86 | #include <ResourceScriptingInterface.h> |
| 87 | 87 | #include <SceneScriptingInterface.h> |
| 88 | 88 | #include <ScriptEngines.h> |
| 89 | +#include <ScriptEntityItem.h> | |
| 89 | 90 | #include <scripting/Audio.h> |
| 90 | 91 | #include <scripting/AssetMappingsScriptingInterface.h> |
| 91 | 92 | #include <scripting/ControllerScriptingInterface.h> |
| @@ -1669,6 +1670,16 @@ void Application::setupSignalsAndOperators() { · 1577 unmodified lines | ||
| 1669 | 1670 | return nullptr; |
| 1670 | 1671 | }); |
| 1671 | 1672 | |
| 1673 | + ScriptEntityItem::setLoadOrReloadScriptOperator([](const EntityItemID& entityID, const QString& oldScriptURL, const QString& newScriptURL) -> bool { | |
| 1674 | + return DependencyManager::get<EntityTreeRenderer>()->checkAndCallPreload(entityID, true, true, oldScriptURL, newScriptURL); | |
| 1675 | + }); | |
| 1676 | + ScriptEntityItem::setUnloadScriptOperator([](const EntityItemID& entityID, const QString& scriptURL) -> void { | |
| 1677 | + DependencyManager::get<EntityTreeRenderer>()->unloadEntityScript(entityID, scriptURL); | |
| 1678 | + }); | |
| 1679 | + EntityItem::setUpdateScriptUserDataOperator([](const EntityItemID& entityID, const QString& scriptURL, const QString& userData) -> void { | |
| 1680 | + return DependencyManager::get<EntityTreeRenderer>()->updateScriptUserData(entityID, scriptURL, userData); | |
| 1681 | + }); | |
| 1682 | + | |
| 1672 | 1683 | Procedural::opaqueStencil = [](gpu::StatePointer state, bool useAA) { |
| 1673 | 1684 | useAA ? PrepareStencil::testMaskDrawShape(*state) : PrepareStencil::testMaskDrawShapeNoAA(*state); |
| 1674 | 1685 | }; |