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

Function advss_get_variable_value

scripting/examples.py:426–442  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

424# variable with a given name.
425# None is returned in case the variable does not exist.
426def advss_get_variable_value(name):
427 proc_handler = obs.obs_get_proc_handler()
428 data = obs.calldata_create()
429
430 obs.calldata_set_string(data, "name", name)
431 obs.proc_handler_call(proc_handler, "advss_get_variable_value", data)
432
433 success = obs.calldata_bool(data, "success")
434 if success is False:
435 obs.script_log(obs.LOG_WARNING, f'failed to get value for variable "{name}"')
436 obs.calldata_destroy(data)
437 return None
438
439 value = obs.calldata_string(data, "value")
440
441 obs.calldata_destroy(data)
442 return value
443
444
445# The advss_set_variable_value() function can be used to set the value of a

Callers 1

variable_python_actionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected