This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from types import SimpleNamespace as _G | |
| from ctypes import * | |
| from ctypes.util import find_library | |
| import obspython as S | |
| G, ffi = _G(), _G() | |
| ffi.obsffi = CDLL(find_library("obs")) # ? PyDLL | |
| G.lock = False | |
| G.start_delay = 2 | |
| G.duration = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ------------------------------------------------------- | |
| -- version 0.1.2 .obj 3D model viewer for OBS Studio -- | |
| -- upgradeQ 2024 -- | |
| -- Released to the Public Domain -- | |
| ------------------------------------------------------- | |
| local S = obslua | |
| local time = 0.0 | |
| local vertex_num = 0 | |
| local clear_color = S.vec4() | |
| local MODEL_FILENAME = "suzanne.obj" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| obs = obslua | |
| S = obs | |
| ffi = require "ffi" | |
| function try_load_library(alias, name) | |
| if ffi.os == "OSX" then name = name .. ".0.dylib" end | |
| ok, _G[alias] = pcall(ffi.load, name) | |
| if not ok then | |
| print(("WARNING:%s:Has failed to load, %s is nil"):format(name, alias)) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| S = obslua | |
| local function skip_tick_render(ctx) | |
| local target = S.obs_filter_get_target(ctx.source) | |
| local width, height; | |
| if target == nil then width = 0; height = 0; else | |
| width = S.obs_source_get_base_width(target) | |
| height = S.obs_source_get_base_height(target) | |
| end | |
| ctx.width, ctx.height = width , height |
OlderNewer