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

Function ImportVariables

lib/variables/variable.cpp:474–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474void ImportVariables(obs_data_t *data)
475{
476 OBSDataArrayAutoRelease array = obs_data_get_array(data, "variables");
477 size_t count = obs_data_array_count(array);
478
479 auto importedVars = new std::vector<std::shared_ptr<Item>>;
480
481 for (size_t i = 0; i < count; i++) {
482 OBSDataAutoRelease arrayElement = obs_data_array_item(array, i);
483 auto var = Variable::Create();
484 var->Load(arrayElement);
485
486 if (variableWithNameExists(var->Name())) {
487 continue;
488 }
489
490 GetVariables().emplace_back(var);
491 importedVars->emplace_back(var);
492 }
493
494 QueueUITask(signalImportedVariables, importedVars);
495}
496
497std::chrono::high_resolution_clock::time_point GetLastVariableChangeTime()
498{

Callers 1

setupFunction · 0.85

Calls 4

variableWithNameExistsFunction · 0.85
QueueUITaskFunction · 0.50
LoadMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected