MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SetupInline

Method SetupInline

plugins/scripting/utils/inline-script.cpp:381–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381void InlineScript::SetupInline()
382{
383 const StringVariable &text =
384 _language == OBS_SCRIPT_LANG_PYTHON ? _textPython : _textLUA;
385 const auto scriptText = preprocessScriptText(text, _language, GetID());
386
387 auto path_ = getScriptTempFilePath(_language);
388 if (!path_) {
389 return;
390 }
391
392 auto path = GetLUACompatiblePath(*path_);
393 if (!createScriptFile(path.c_str(), scriptText.c_str())) {
394 return;
395 }
396
397 _script = std::unique_ptr<obs_script_t, ScriptDeleter>(
398 CreateOBSScript(path.c_str(), nullptr), {path});
399 _lastResolvedText = text;
400}
401
402void InlineScript::Setup()
403{

Callers

nothing calls this directly

Calls 6

preprocessScriptTextFunction · 0.85
getScriptTempFilePathFunction · 0.85
GetLUACompatiblePathFunction · 0.85
createScriptFileFunction · 0.85
CreateOBSScriptFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected