 |
|
|
07-07-2023, 10:50 PM
|
#1
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
Right projects tabs not accessible and blocked by MONITOR FX button [FIXED]
Last projects tab(s) are not accessible if there are lot of tabs - they are blocked by MONITOR FX button !!! (deserves a fix, please...)
< and > arrows in tabs bar to navigate to the right or left within tabs would be nice.
!!! EDIT 20230720: This issue was fixed in version 6.81+dev0720a. Thank you.
Last edited by akademie; 07-20-2023 at 03:11 PM.
|
|
|
07-18-2023, 03:18 PM
|
#2
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
pretty please
|
|
|
07-18-2023, 05:11 PM
|
#3
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,677
|
Maybe use a couple Lua scripts/functions? Something like,..
Code:
-- Select next project.lua
local p = reaper.EnumProjects(-1)
for i = 0, 99 do
if p == reaper.EnumProjects(i) and reaper.EnumProjects(i+1) ~= nil then
reaper.SelectProjectInstance(reaper.EnumProjects(i+1))
break
end
end
Code:
-- Select previous project.lua
local p = reaper.EnumProjects(-1)
for i = 0, 99 do
if p == reaper.EnumProjects(i) and reaper.EnumProjects(i-1) ~= nil then
reaper.SelectProjectInstance(reaper.EnumProjects(i-1))
break
end
end
|
|
|
07-18-2023, 05:38 PM
|
#4
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
The Dev Builds have all the select project tabs needed.
I’m looking fwd for it to be in the public build.
For now I work with the dev builds no problems
|
|
|
07-19-2023, 02:42 AM
|
#5
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
no, dev builds have no way to "see" what projects are open in tabs to the right if there are many of them (and with longer names).
This is obviously a bug, the project tab bar should end right before the MonitorFX button to be able to simply click the right-most project tab to activate it.
As an addition, scrolling the project tab bar would be super nice to have.
I do not want to select e.g. Project tab #20 (which is not visible) directly using actions, because I only want to inspect what is openend in tab #19, #20 and #21, then I would select appropriate tab manually depending what I decide to choose.
|
|
|
07-19-2023, 02:57 AM
|
#6
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
Quote:
Originally Posted by Edgemeal
Maybe use a couple Lua scripts/functions? Something like,..
<snip>...
[/CODE]
|
Thanks, but for that there are also native actions "Project tabs: Switch to previous project tab" and "Project tabs: Switch to next project tab" which I have to use and sometimes even create these two buttons in my main toolbar.
Working workaround, but still this way I have to activate all tabs in between, while browsing next>next (or prev<prev) so if the tabs contain big projects it loads=activate projects which I even do not need.
E.g. to activate project tab #23, if active tab is #3 and total open tabs is 50, means to click the last visible and accessible tab in tab bar, let's say it is #15 (it will load=activate project), then use the" next" action 8 times (it will activate 7 big projects one by one unnecessarily) and finally activate the tab I needed. BAD
|
|
|
07-19-2023, 05:25 AM
|
#7
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
Quote:
Originally Posted by akademie
no, dev builds have no way to "see" what projects are open in tabs to the right if there are many of them (and with longer names).
This is obviously a bug, the project tab bar should end right before the MonitorFX button to be able to simply click the right-most project tab to activate it.
As an addition, scrolling the project tab bar would be super nice to have.
I do not want to select e.g. Project tab #20 (which is not visible) directly using actions, because I only want to inspect what is openend in tab #19, #20 and #21, then I would select appropriate tab manually depending what I decide to choose.
|
Ah ok I understand…
This is the main reason why I built my own tablist in Realive years ago.
|
|
|
07-19-2023, 07:04 AM
|
#8
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,677
|
Quote:
Originally Posted by akademie
I do not want to select e.g. Project tab #20 (which is not visible) directly using actions, because I only want to inspect what is openend in tab #19, #20 and #21, then I would select appropriate tab manually depending what I decide to choose.
|
Maybe devs could add a list, something like?...
Experimental script: Project tab selector.lua
|
|
|
07-19-2023, 07:52 AM
|
#9
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
Yes, a native list of projects would be fine (without need of imGui though
In any case thanks for the script Edgemeal
Last edited by akademie; 07-19-2023 at 08:01 AM.
|
|
|
07-19-2023, 08:40 PM
|
#10
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
Quote:
Originally Posted by Edgemeal
|
Pretty cool to do it with ImGui. Wondering if it's more efficient than doing it with the gfx stuff.
Just a side note. I think REAPER allows up to 127 or 128 Opened project tabs, so you might want to use that max value in your for loop.
|
|
|
07-20-2023, 07:23 AM
|
#11
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,677
|
Probably the most efficient way would be to just use a submenu, only need to get list of open projects once, can show checkmark next to current active project, allows user to see all open projects and select one. REAPER already has a million menus, what's one more?
|
|
|
07-20-2023, 01:02 PM
|
#12
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,539
|
Adapted it to show the list in a menu (+ checkbox for current tab, shortcuts for the first 10 projects, filename tooltip, support for up to infinity project tabs, fixed selection if >1 tabs have the same name):
Code:
dofile(reaper.GetResourcePath() ..
'/Scripts/ReaTeam Extensions/API/imgui.lua')('0.8')
local ImGui = {}
for name, func in pairs(reaper) do
name = name:match('^ImGui_(.+)$')
if name then ImGui[name] = func end
end
local ctx = ImGui.CreateContext('Project tab selector',
ImGui.ConfigFlags_NoSavedSettings())
local sans_serif = ImGui.CreateFont('sans-serif', 13)
ImGui.Attach(ctx, sans_serif)
local function tooltipForItem(text)
if ImGui.IsItemHovered(ctx, ImGui.HoveredFlags_DelayNormal()) and
ImGui.BeginTooltip(ctx) then
ImGui.PushTextWrapPos(ctx, ImGui.GetFontSize(ctx) * 35)
ImGui.Text(ctx, text)
ImGui.PopTextWrapPos(ctx)
ImGui.EndTooltip(ctx)
end
end
local function projectItem(n, project, filename, current)
local name = reaper.GetProjectName(project, '')
if name:len() < 1 then name = ('[Unsaved %d]'):format(n) end
local shortcut, shortcutPressed
if n <= 10 then
shortcut = tostring(n):sub(-1)
local key = ImGui['Key_' .. shortcut]()
shortcutPressed = ImGui.IsKeyPressed(ctx, key)
end
if ImGui.MenuItem(ctx, name, shortcut, current) or shortcutPressed then
reaper.SelectProjectInstance(project)
end
if shortcutPressed then
ImGui.CloseCurrentPopup(ctx)
end
if filename:len() > 0 then
tooltipForItem(filename)
end
end
local function projectList()
local currentProject = reaper.EnumProjects(-1)
for i = 0, math.huge do
local project, filename = reaper.EnumProjects(i)
if not project then break end
ImGui.PushID(ctx, i)
projectItem(i + 1, project, filename, project == currentProject)
ImGui.PopID(ctx)
end
end
local function loop()
if ImGui.IsWindowAppearing(ctx) then
ImGui.SetNextWindowPos(ctx,
ImGui.PointConvertNative(ctx, reaper.GetMousePosition()))
ImGui.OpenPopup(ctx, 'Select a project')
end
ImGui.PushFont(ctx, sans_serif)
if ImGui.BeginPopup(ctx, 'Select a project', ImGui.WindowFlags_TopMost()) then
projectList()
ImGui.End(ctx)
reaper.defer(loop)
end
ImGui.PopFont(ctx)
end
reaper.defer(loop)
Last edited by cfillion; 07-20-2023 at 02:40 PM.
|
|
|
07-20-2023, 01:33 PM
|
#13
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
It looks pretty cool cfillion, yeah
But still, ImGui cannot be used (=is not working) on most older laptops (I think due to low OpenGL versions)
|
|
|
07-20-2023, 01:37 PM
|
#14
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,539
|
Quote:
Originally Posted by akademie
But still, ImGui cannot be used (=is not working) on most older laptops (I think due to low OpenGL versions) 
|
Solved that a while ago in v0.8 with the addition of a DirectX 10 renderer and automatic fallback to software rendering if the GPU is too ancient. Any machine running Windows Vista* or newer is compatible now (unless there's another problem I'm not aware of? if so, what error message do you get?).
(* The DirectX 10 software rasterizer component is pre-installed on Windows 7 and up. On Vista it came with the update KB971644.)
Last edited by cfillion; 07-20-2023 at 02:07 PM.
|
|
|
07-20-2023, 02:25 PM
|
#15
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
Oh heavens, that's a very good news.
Thank you, I will try it tomorrow or during weekend.
(There is some openGL emulator DLL which kind of worked, but it was too much hassle to add all of that to installations, so I limited myself to native only Reaper 
Of course I can have and sometimes I have version where some extensions, SWS, js_ReaAPI etc. have installed, but mainly focusing on doing most from what is available directly
Anyway imGui is now rather standard for large number of cool scripts which require graphic controls so I am glad for your updated info and code of ReaImGUI
So again, thank you.
|
|
|
07-20-2023, 03:13 PM
|
#16
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
BTW, the issue was fixed in version 6.81+dev0720a.
Thank you devs.
I still appreciate additional approaches, like list of project tabs etc. presented here in the thread...
|
|
|
07-28-2023, 02:04 PM
|
#17
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
Another one, for collection, uses regular REAPER menu, no dependencies
|
|
|
07-28-2023, 02:10 PM
|
#18
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
^^^^^^^ Oh, yeah, well done Buy One. Thanks
EDIT:
just one minor graphics glitch, see screenshot
Last edited by akademie; 07-28-2023 at 02:32 PM.
|
|
|
07-29-2023, 12:00 AM
|
#19
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
Not sure what this is in the screenshot. I didn't notice anything odd while testing. When the menu opens a small GUI box opens at the top left corner of the screen because the menu is part of the ReaScript gfx library, maybe this is it, although on Windows it looks different and is located higher. Unfortunately cannot look into this further because i have no access to a Mac.
|
|
|
07-29-2023, 09:26 AM
|
#20
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,677
|
It unlikely the OS will allow a window to be zero size (especially one that has borders/titlebar), a simple way to hide a window is to move it off the screen (on Windows at least),
gfx.init( '',0,0,0, -100, -100 )
But that doesn't work, the gfx window is still visible at top-left on my Win10.
|
|
|
07-29-2023, 01:08 PM
|
#21
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
What i tried was to hide it behind the menu but this method is hit and miss because the location the menu will open at is not obvious in advance, it seems to depend on both the mouse position and menu length.
|
|
|
07-29-2023, 02:39 PM
|
#22
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
Here is a simple version version with no gfx window:
Last edited by lexaproductions; 07-30-2023 at 11:34 AM.
|
|
|
07-29-2023, 02:56 PM
|
#23
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
As a bonus, here's a version with the full list length
|
|
|
07-29-2023, 11:55 PM
|
#24
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
Thank you lexaproductions, but these require SWS|S&M - JS_API extensions, so I will stick with Buy One's version which is simply "native".
|
|
|
07-30-2023, 12:09 AM
|
#25
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
Quote:
Originally Posted by lexaproductions
|
Pored over the code trying to figure out what the trick was. But on Windows the menu doesn't load and i have all the listed extensions installed although i don't see calls to them in the script. So does this mean that on MacOS gfx.init can be omitted for the menu?
|
|
|
07-30-2023, 12:43 AM
|
#26
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
^^^^^^ oh yeah, for me it didn't work at all also and I though it's becasue of the required extensions.
But now, trying to paste gfx.init('', 0, 0) to the code it started to work, but with the same result = part of the main window detached from the list.
|
|
|
07-30-2023, 02:51 AM
|
#27
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
I think because it’s a menu, you must start it with a key command. Have you tried?
I don’t think you need a gfx init for this
Not sure you need sws either. Not in front of the code right now so can’t tell.
|
|
|
07-30-2023, 03:14 AM
|
#28
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
Quote:
Originally Posted by lexaproductions
I think because it’s a menu, you must start it with a key command. Have you tried?
I don’t think you need a gfx init for this
Not sure you need sws either. Not in front of the code right now so can’t tell.
|
Sure I did. I mapped a key to the action and nothing happens. When I added the gfx init code line it started to show the list, but again with the micro window bar somewhere in the left.
|
|
|
07-30-2023, 06:39 AM
|
#29
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
That’s interesting
I’ll look it up on a pc
|
|
|
07-30-2023, 06:42 AM
|
#30
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,677
|
@ lexaproductions
No menu shown on Win10 here for either script, I see 'GDI Object' counter for reaper.exe increases by 2 for a ~sec then decreases by 2, so can only guess its trying to load/show it but silently fails. I always thought you had to have a gfx window to use the gfx menu?
|
|
|
07-30-2023, 07:15 AM
|
#31
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
Must be a windows thing as it works on my Mac.
I’ll investigate.
|
|
|
07-30-2023, 07:21 AM
|
#32
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
akademie seems to also be using Mac, so the reason could lie deeper, like in the version of MacOS or other factors.
|
|
|
07-30-2023, 07:40 AM
|
#33
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
it was only your (Buy One) script that I used on Mac (Monterey).
Then both, your and lexaproductions' scripts I am using during weekend on Windows 10
I can try the lexaproductions ones in Monterey later today or tomorrow just to confirm if working in vanilla Reaper in Mac.
|
|
|
07-30-2023, 11:08 AM
|
#34
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
Ah, OK, that would help to clear things up
|
|
|
07-30-2023, 11:25 AM
|
#35
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
Quote:
Originally Posted by Buy One
akademie seems to also be using Mac, so the reason could lie deeper, like in the version of MacOS or other factors.
|
FWIW, I just made a totally clean portable install without SWS or any other user plugin installed.
Loaded the script in the action list and assigned the key [0] to it. It's working.
I have an M2 macbook pro running ventura.
That being said, I did find a small bug in the bug. Please download again
Last edited by lexaproductions; 07-30-2023 at 11:32 AM.
|
|
|
07-30-2023, 05:49 PM
|
#36
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,705
|
OK, I tried the last lexaproductions' script "Realive_ProjectTab_Menu With List Length.lua" and it WORKS in macOS Monterey 12.3.1, but DOES NOT WORK in Windows 10 (32-bit).
macOS Monterey 12.3.1 and REAPER v6.81+dev0719 = WORKING OK
Windows 10 (32-bit) and REAPER v6.81+dev0730 = NOT WORKING
Last edited by akademie; 07-30-2023 at 06:02 PM.
|
|
|
07-30-2023, 11:48 PM
|
#37
|
Human being with feelings
Join Date: Sep 2019
Posts: 926
|
Thank you academie, that's a bit of a revelation. May ask Justin as to why this is so.
|
|
|
07-31-2023, 09:06 AM
|
#38
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
So can somebody with a PC confirm that this simple script won't show anything on a window's computer?
Code:
gfx.showmenu('1. Menu Line|2. Menu Line')
|
|
|
07-31-2023, 10:33 AM
|
#39
|
Human being with feelings
Join Date: Mar 2013
Posts: 5,754
|
Quote:
Originally Posted by lexaproductions
So can somebody with a PC confirm that this simple script won't show anything on a window's computer?
|
Quote:
gfx.showmenu('1. Menu Line|2. Menu Line')
|
This line alone doesn't show anything.
As far as I know, this function only works when a gfx window was initialized first <-- EDIT: I remembered it wrong, see the next posts
So the issue in the example code below is that you'll have to get the mouse cursor (x and y) positions before initializing the window (probably with a non-native function):
Otherwise the gfx window will have x=0, y=0 as starting coordinates.
Code:
gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y .. "\n")
gfx.init(" ", 0, 0, 0, gfx.x, gfx.y) -- gfx.init("name"[,width,height,dockstate,xpos,ypos] )
gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y)
gfx.showmenu("1. Menu Line|2. Menu Line")
Can't remember exactly if hiding the gfx windows completely is possible. So you'll probably have to use functions of one of the extensions for this.
EDIT: Just did a test on Windows so far. Haven't tried it on macOS yet.
Last edited by solger; 07-31-2023 at 10:52 AM.
|
|
|
07-31-2023, 10:42 AM
|
#40
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,052
|
Quote:
Originally Posted by solger
This line alone doesn't show anything. As far as I know this function only works inside a gfx window
So the issue in the example code below is that you'll have to get the mouse cursor (x and y) positions before initializing the window (probably with a non-native function):
Code:
gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y .. "\n")
gfx.init(" ", 0, 0, 0, gfx.x, gfx.y) -- gfx.init("name"[,width,height,dockstate,xpos,ypos] )
gfx.x, gfx.y = gfx.mouse_x, gfx.mouse_y
reaper.ShowConsoleMsg(gfx.x .. " / " .. gfx.y)
gfx.showmenu("1. Menu Line|2. Menu Line")
|
Thanks Solger, I understand what you're saying. But why is this working then?
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:20 PM.
|