MCPcopy Create free account
hub / github.com/begla/Intrinsic / onScriptChanged

Method onScriptChanged

IntrinsicEd/src/IntrinsicEdManagerWindowScript.cpp:40–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void IntrinsicEdManagerWindowScript::onScriptChanged(const QString& p_FileName)
41{
42 new IntrinsicEdNotificationSimple(
43 this, ("Script '" + p_FileName + "' changed...").toStdString().c_str());
44
45 Resources::ScriptRefArray resourcesToRecreate;
46
47 for (uint32_t i = 0u; i < Resources::ScriptManager::getActiveResourceCount();
48 ++i)
49 {
50 Resources::ScriptRef ref =
51 Resources::ScriptManager::getActiveResourceAtIndex(i);
52 if (strcmp(p_FileName.toStdString().c_str(),
53 (_scriptPath +
54 Resources::ScriptManager::_descScriptFileName(ref).c_str())
55 .toStdString()
56 .c_str()) == 0u)
57 {
58 resourcesToRecreate.push_back(ref);
59 }
60 }
61
62 Resources::ScriptManager::destroyResources(resourcesToRecreate);
63 Resources::ScriptManager::createResources(resourcesToRecreate);
64}
65
66void IntrinsicEdManagerWindowScript::onResourceTreePopulated()
67{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected