-
Notifications
You must be signed in to change notification settings - Fork 1
/
RCJacH_ReaGit.lua
41 lines (31 loc) · 956 Bytes
/
RCJacH_ReaGit.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
if not reaper.ImGui_GetBuiltinPath then
reaper.MB("Missing dependency: ReaImGui extension.\nDownload it via Reapack ReaTeam extension repository.", "Error", 0)
return reaper.ReaPack_BrowsePackages('dear imgui')
end
package.path = reaper.ImGui_GetBuiltinPath() .. '/?.lua'
im = require 'imgui' '0.9.1'
local workspace_folder = debug.getinfo(1).source:match("@(.*[/\\])")
package.path = package.path .. ';' .. workspace_folder ..'?.lua'
require('src.std+')
local INTERFACE = require('src.interface')
local PROJECT, PROJECT_FILEPATH = reaper.EnumProjects(-1)
local retval, REAGIT_REPO = reaper.GetProjExtState(PROJECT, "reagit", "repo")
if ~retval then
REAGIT_REPO = PROJECT_FILEPATH
end
local GUI
function init()
GUI = INTERFACE(REAGIT_REPO)
return true
end
function loop()
local open = GUI:loop()
if open then
reaper.defer(loop)
else
GUI:exit()
end
end
if init() then
reaper.defer(loop)
end