Prev Previous Post   Next Post Next
Old 02-17-2016, 10:59 AM   #1
Human being with feelings
cubic13's Avatar
Join Date: Dec 2013
Location: Near Serre-Ponçon lake, french Alps
Posts: 856
Default BR_GetCurrentTheme() function : how to use it ?

Lua attempt : the following code works...
function gTheme()
local lThemePath = reaper.GetLastColorThemeFile()
reaper.ShowConsoleMsg("Theme info :".."\n"..lThemePath)

I get this, which is what was expected :

Theme info :
F:\Reaper5_Portable\ColorThemes\EyssinaFM.ReaperTh eme

The following code doesn't...
function gTheme()
local lThemePath, lThemeName = reaper.BR_GetCurrentTheme()
reaper.ShowConsoleMsg("Theme info :".."\n"..lThemePath.."\n"..lThemeName)

I just get this :

Theme info :

The problem is that I want only the name of the current theme, without path or extension, which is exactly what the BR_GetCurrentTheme function is supposed to provide, as a second return string. The 'ReaScript documentation' states this :

Lua: string themePathOut retval, string themeNameOut reaper.BR_GetCurrentTheme()
[BR] Get current theme information. themePathOut is set to full theme path and themeNameOut is set to theme name excluding any path info and extension

So :
1) What am I doing wrong ?
2) What does 'retval' means, actually ?
3) Additionaly, is there any actual examples of using this kind of functions somewhere as, even using this documentation, I'm not still sure about how to use the parameters call (again, the 'retval' one...) ?

Thanks for any help...

EDIT : I have the SWS extensions 2.8.3 installed and working, just in case...
DAW: Ryzen 3700X|Asus X-470Pro|32Gb|2 SSD512(M2)+1024|W10Pro(64)|RME Fireface UCX+ADA8200
Soft: Reaper|Cubase 10|Emulator X3 & several other VSTis (2 bridged)...
Gear: VMK-188+|MPD32|ME30P|Korg 05R/W|Roland D110|Yamaha TX802|Pre-MIDI stuff...

Last edited by cubic13; 02-20-2016 at 02:11 AM.
cubic13 is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 02:42 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.