mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 12:18:35 -05:00
Add support for inline scripts
* Script can be defined in the macro segment or loaded from a file * Supports both LUA and Python * Can be used for actions and conditions * obs_script_create and obs_script_destroy are resolved at runtime (Let's hope the API remains stable)
This commit is contained in:
23
plugins/scripting/utils/obs-script-helpers.hpp
Normal file
23
plugins/scripting/utils/obs-script-helpers.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include <obs-data.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
// Based on obs-scripting.h
|
||||
|
||||
struct obs_script;
|
||||
typedef struct obs_script obs_script_t;
|
||||
|
||||
enum obs_script_lang {
|
||||
OBS_SCRIPT_LANG_UNKNOWN,
|
||||
OBS_SCRIPT_LANG_LUA,
|
||||
OBS_SCRIPT_LANG_PYTHON
|
||||
};
|
||||
|
||||
namespace advss {
|
||||
|
||||
obs_script_t *CreateOBSScript(const char *path, obs_data_t *settings);
|
||||
void DestroyOBSScript(obs_script_t *script);
|
||||
std::string GetLUACompatiblePath(const std::string &path);
|
||||
|
||||
} // namespace advss
|
||||
Reference in New Issue
Block a user