Old 03-06-2024, 03:56 AM   #1
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default Lua: Pie Menu 3000 (Beta)

Expect the unexpected!


Made this over a year ago so I thought its time to finish it:
Fancy pie menu that looks native.


3 Different Styles: Modern, Text Button, DropDown


Tutorial Simple (Drag actions in, create menu double click it, drag actions in it.....)


Tutorial Advanced (Create Menus in Editor, Apply it to context, Add to context, Add to other menu as submenu)

Menu editor allows you to make library of menus that you can insert anywhere or apply them as context

And ofcourse to delete stuff just ALT delete it into oblivion:



I'm kinda bad with announcements etc, but its pretty simple to use (at least I've tried to make it simple as possible).

This is beta release so I need feedback to make things that are maybe awkward a bit better, add features, improve UI and UX. Features will be implemented, things will get fixed but mostly interested in UI/UX part atm.

BASIC USAGE:
Code:
1. Add Shortcut to Sexan_Pie3000.lua
2. Press and hold down that key
3. Be amazed
Download from my ReaPack

WARNING: WHILE IN BETA THINGS CAN CHANGE SO YOUR MENUS MAY BREAK ON NEW RELEASES! (Don't get attached to them)

Last edited by Sexan; 04-09-2024 at 05:25 AM.
Sexan is offline   Reply With Quote
Old 03-06-2024, 04:00 AM   #2
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

Unbelievable! It looks amazing
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 04:03 AM   #3
Suzuki
Human being with feelings
 
Suzuki's Avatar
 
Join Date: Jul 2022
Location: Japan
Posts: 809
Default

The pie party has begun!
Suzuki is offline   Reply With Quote
Old 03-06-2024, 04:04 AM   #4
smandrap
Human being with feelings
 
smandrap's Avatar
 
Join Date: Feb 2021
Location: Right here
Posts: 1,443
Default

__________________
My Scripts
smandrap is online now   Reply With Quote
Old 03-06-2024, 04:18 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

State of art ReaScripting. 🌟
X-Raym is offline   Reply With Quote
Old 03-06-2024, 04:55 AM   #6
hans
Human being with feelings
 
Join Date: Aug 2020
Posts: 281
Default

What can you say? Amazing.

Requests:
* Able to toggle show the menu , not only holding down key.
* Ability to assign key-shortcuts to the buttons in the menu that pops up.

Last edited by hans; 03-06-2024 at 05:03 AM.
hans is offline   Reply With Quote
Old 03-06-2024, 05:30 AM   #7
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Working on toggle show atm will be live soon
Sexan is offline   Reply With Quote
Old 03-06-2024, 05:39 AM   #8
MeWest
Human being with feelings
 
Join Date: Jan 2022
Posts: 33
Default

Very cool! will it be possible to select the desired menu item through the buttons on the keyboard?
MeWest is offline   Reply With Quote
Old 03-06-2024, 05:43 AM   #9
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Live
Code:
-- @version 0.1.36
-- @changelog
--  Added user settings (SETUP SCRIPT)
--  Toggle open, animation, activate on close (SETUP SCRIPT)


Quote:
Originally Posted by MeWest View Post
Very cool! will it be possible to select the desired menu item through the buttons on the keyboard?
Yes it will
Sexan is offline   Reply With Quote
Old 03-06-2024, 05:54 AM   #10
MeWest
Human being with feelings
 
Join Date: Jan 2022
Posts: 33
Default

Quote:
Originally Posted by Sexan View Post
Live
Code:
-- @version 0.1.36
-- @changelog
--  Added user settings (SETUP SCRIPT)
--  Toggle open, animation, activate on close (SETUP SCRIPT)




Yes it will
unbelievable!
MeWest is offline   Reply With Quote
Old 03-06-2024, 06:30 AM   #11
Suzuki
Human being with feelings
 
Suzuki's Avatar
 
Join Date: Jul 2022
Location: Japan
Posts: 809
Default

It seems that menu on arrange and TCP context only opens over the track whilst Radial Menu opens over no track in the context.
Suzuki is offline   Reply With Quote
Old 03-06-2024, 06:34 AM   #12
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Did not handle empty context yet
Sexan is offline   Reply With Quote
Old 03-06-2024, 07:11 AM   #13
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,827
Default

WOW that's really amazing, will try soon. Just curious, could there be an option to bypass the native right click menus and instead open this menu with right click?
Vagelis is online now   Reply With Quote
Old 03-06-2024, 07:19 AM   #14
Hipox
Human being with feelings
 
Join Date: Apr 2022
Posts: 204
Default

Wow, you're the cook!
Hipox is offline   Reply With Quote
Old 03-06-2024, 07:24 AM   #15
Alez156
Human being with feelings
 
Alez156's Avatar
 
Join Date: Jun 2015
Location: Venezuela
Posts: 349
Default

Looking sooooo clean!! can't wait to try it out tonight
__________________
💙 I run Reapertips.com | 🦋 Reapertips Theme | ☕️ Buy me a coffee
🎸 Modern Metal Songwriting REAPER Template
Alez156 is offline   Reply With Quote
Old 03-06-2024, 07:49 AM   #16
Perken
Human being with feelings
 
Perken's Avatar
 
Join Date: May 2019
Location: Los Angeles / God forbid…
Posts: 193
Default

Let's chef it up!
Perken is offline   Reply With Quote
Old 03-06-2024, 08:40 AM   #17
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 665
Default

Let's gooooooooo! this thing looks awesome! That small pop up animation makes it look so modern, thank you! Will try asap
tonalstates is offline   Reply With Quote
Old 03-06-2024, 10:13 AM   #18
grandfougue
Human being with feelings
 
grandfougue's Avatar
 
Join Date: Sep 2016
Posts: 513
Default

Wow juste magnifique thanks
grandfougue is offline   Reply With Quote
Old 03-06-2024, 10:58 AM   #19
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Code:
-- @version 0.1.37
-- @changelog
--  Added shortcuts for menus or actions
--  Fixed serialization for data and extstate
added initial shortcut support


BTW since this is BETA and its subject to potentially change some things that may break your menus don't get too attached to them

Quote:
Originally Posted by Vagelis View Post
WOW that's really amazing, will try soon. Just curious, could there be an option to bypass the native right click menus and instead open this menu with right click?
Only with separate defered script but it would block right click on anything

Last edited by Sexan; 03-06-2024 at 11:05 AM.
Sexan is offline   Reply With Quote
Old 03-06-2024, 11:11 AM   #20
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,008
Default

Lets go sexan another big hit!!
daniellumertz is offline   Reply With Quote
Old 03-06-2024, 11:27 AM   #21
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

Thanks again for sharing the test version, I've been waiting for this beauty to show up for a long time I'm a fan of this device, praise the fantastic appearance. Here are my notes on it if any:
I periodically get an error while deleting some actions:
Code:
:574: attempt to index a nil value (field '?')
and
Code:
(g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"
I first move an action to an area using DND, for example several times, and then delete them and get the same error. And also by turning animation on and off again a couple times in the settings, I got an open Pie window on call, which never managed to close. Moreover it kept the mouse in focus, not allowing it to close or minimize, had to close using task manager. With the animation enabled, the error could not be detected again. If you re-click the action call button a couple times while opening, you can re-detect the error.


Regarding suggestions:
1. I would like an "apply" button in the Pie Setup window so I don't have to close the window to check the actions
2. icons as I understood are used directly from the font, and this is probably the most convenient way, but I think it is possible to use directly sets of icons - multi images with different scales. It is quite controversial, but probably users will be easier to change or redraw icons for a particular template.
3. it would be great to create something like custom actions but individually for Pie. For example, by moving some action with the help of DND or to the top (under the field for entering the name displays the set action) where you could collect several necessary actions, as well as replace some actions in existing cells that still need to delete the previous ones for replacement.
3.1 If we go a bit deeper, it would be great to have a checkbox in the settings that would allow to "get" context focus. The idea is to open a menu for a certain context, so it would be possible to select a track while deselecting the others (maybe a separate setting), since most actions related to the track require selection. I don't think this is a "panacea idea", but it's something to think about.
4. In the place where the key can be set it would be convenient to set via keyboard input
5. I would love buttons that could rotate the cells around the center ring by shifting by certain values
Don't think I'm being meticulous:
1. When scrolling through a viewport with icons for a cell in focus, if you release the lcm over the center button inside Pie Setup, it loses focus and exits
2. it would be great to highlight the action names or the actual set names in the cells under the cursor after some time after hovering. Perhaps the problem is the little time spent, but during the "builds" of their actions is hard to quickly navigate with what I set there and under what icon

I'll play with it tomorrow and post ideas if they don't seem cheeky! Upd in the new version without animation almost immediately "freezes" and does not allow you to do anything

Last edited by erikmartinez; 03-06-2024 at 11:50 AM.
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 11:30 AM   #22
bobobo
Human being with feelings
 
bobobo's Avatar
 
Join Date: Oct 2014
Posts: 1,368
Default

Quote:
Originally Posted by Suzuki View Post
It seems that menu on arrange and TCP context only opens over the track whilst Radial Menu opens over no track in the context.
and it doesn't make good coffee

but 😮🤓
bobobo is offline   Reply With Quote
Old 03-06-2024, 11:43 AM   #23
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Quote:
Originally Posted by erikmartinez View Post
Thanks again for sharing the test version, I've been waiting for this beauty to show up for a long time I'm a fan of this device, praise the fantastic appearance. Here are my notes on it if any:
I periodically get an error while deleting some actions:
Code:
:574: attempt to index a nil value (field '?')
and
Code:
(g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"
I first move an action to an area using DND, for example several times, and then delete them and get the same error.
Cant reproduce that atm...

Quote:
Originally Posted by erikmartinez View Post
And also by turning animation on and off again a couple times in the settings, I got an open Pie window on call, which never managed to close. Moreover it kept the mouse in focus, not allowing it to close or minimize, had to close using task manager. With the animation enabled, the error could not be detected again. If you re-click the action call button a couple times while opening, you can re-detect the error.
So its only when animation is checked? I am aware of this issue but could not figure out where its coming from.

Quote:
Originally Posted by erikmartinez View Post
Regarding suggestions:
1. I would like an "apply" button in the Pie Setup window so I don't have to close the window to check the actions
Sure
Quote:
Originally Posted by erikmartinez View Post
2. icons as I understood are used directly from the font, and this is probably the most convenient way, but I think it is possible to use directly sets of icons - multi images with different scales. It is quite controversial, but probably users will be easier to change or redraw icons for a particular template.
Png support is possible (I've done it with toolbar icons but they look like crap since they need specific background to work.
We will need to talk a bit about png support and image details

Quote:
Originally Posted by erikmartinez View Post
3. it would be great to create something like custom actions but individually for Pie. For example, by moving some action with the help of DND or to the top (under the field for entering the name displays the set action) where you could collect several necessary actions, as well as replace some actions in existing cells that still need to delete the previous ones for replacement.
Did not quite understand this sorry

Quote:
Originally Posted by erikmartinez View Post
3.1 If we go a bit deeper, it would be great to have a checkbox in the settings that would allow to "get" context focus. The idea is to open a menu for a certain context, so it would be possible to select a track while deselecting the others (maybe a separate setting), since most actions related to the track require selection. I don't think this is a "panacea idea", but it's something to think about.
Would export menu help here? I planed to make exporting pies in actions so you can have any menu as standalone

Quote:
Originally Posted by erikmartinez View Post
I'll play with it tomorrow and post ideas if they don't seem cheeky! Upd in the new version without animation almost immediately "freezes" and does not allow you to do anything
Will try to figure out why it gets stucked
Sexan is offline   Reply With Quote
Old 03-06-2024, 11:50 AM   #24
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

Also while experimenting with created menus and submenus, when moving a particular menu to already created menus, which in turn are moved to, for example, a tcp context. After closing I see some kind of infinite loop created that makes my reaper hang. The way out is to exit through the task manager again. I tried to repeat this error and still got stack overflow after a few minutes. At the same time, it still did not allow me to exit reaper - "Reaper is not responding...".

By the way I really like to use something like key combinations - current set button to call menu + set button under a certain cell. Even very quickly pressed it still manages to trigger the action before the animation appears
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 11:53 AM   #25
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Pushed small fix that seems to fix (hopefully) freeze when animation is turned off.

The menu thing I am aware (did not added any restrictions yet but need to add not to add itself and not to be deleted if its used in some pie)
Sexan is offline   Reply With Quote
Old 03-06-2024, 12:00 PM   #26
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

Example #1:


Example #2(didn't get the result "on purpose"):
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 12:07 PM   #27
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Example 1 is expected to happen since you are adding menu to itself will cause bad things (will tackle that next).

Example 2 I'm really trying to figure out why it gets stuck (running into this myself)
Sexan is offline   Reply With Quote
Old 03-06-2024, 12:18 PM   #28
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Just in case I've added Kill switch.

Code:
-- @version 0.1.39
-- @changelog
--  Kill on ESC
Until I find why it gets hanged
Sexan is offline   Reply With Quote
Old 03-06-2024, 12:19 PM   #29
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

Quote:
Originally Posted by Sexan View Post
Example 1 is expected to happen since you are adding menu to itself will cause bad things (will tackle that next).

Example 2 I'm really trying to figure out why it gets stuck (running into this myself)
I haven't looked at your code yet, but I once had a similar situation with waiting for the end of an animation or the beginning of the next one, in general, the process between animations




By the way, I assumed that you can create separate "folders" with custom menus that can be placed in some contexts




Regarding what you didn't understand (my suggestion is number 3), I meant simply adding several actions to one cell, with the ability to replace/delete some actions in each cell instead of creating custom ones, not the best idea, but this is what I needed once in the radial menu. By the way, how do you want to implement the opening of a custom menu without context? If there are no cells, for example, should I use a custom context in the context of "arrange"? Sorry if the wording is strange, translation difficulties

Update:
Quote:
Originally Posted by Sexan View Post
Just in case I've added Kill switch.

Code:
-- @version 0.1.39
-- @changelog
-- Kill on ESC
Until I find why it gets hanged
This is enough for now, I intuitively pressed esc in the hope of turning it off!

Again from the little things:
You can add a separator of the "|" type to move the text to a new line inside the central cell

Last edited by erikmartinez; 03-06-2024 at 12:27 PM.
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 12:22 PM   #30
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,827
Default

Quote:
Originally Posted by Sexan View Post
Only with separate defered script but it would block right click on anything
That's ok! I would love to give it a try because I almost converted all my mouse edits to left click and was looking for such a workflow to open toolbars. I guess it's not possible to bypass per context, although still fine, but since it could be a script, we could run or end it when we want to go back to normal right click?
Also after trying it looks more modern than native reaper stuff

P.s I think it would be useful too if there was a context for the bottom part of the item.
Vagelis is online now   Reply With Quote
Old 03-06-2024, 12:30 PM   #31
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

In your latest version, I found that the speed of opening the window with animation has decreased, as if the animation speed in general has become less. And also periodically I get an error:
Code:
(g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"
Code:
Error: Sexan_Pie3000.lua:169: attempt to perform arithmetic on a nil value (local 'begin_val')

Stack traceback:
	Sexan_Pie3000.lua:169: in upvalue 'EasingAnim'
	Sexan_Pie3000.lua:537: in upvalue 'DrawCenter'
	Sexan_Pie3000.lua:584: in upvalue 'DrawPie'
	Sexan_Pie3000.lua:646: in function <...g\REAPER\Scripts\Sexan_Scripts\Pie3000\Sexan_Pie3000.lua:626>
		[C]: in function 'xpcall'
	Sexan_Pie3000.lua:140: in function <...g\REAPER\Scripts\Sexan_Scripts\Pie3000\Sexan_Pie3000.lua:139>

Reaper:       	7.11/x64
Platform:     	Win64
upd:
I've checked between version 38 and 39 now, maybe I'm already winding something up for myself, you'll excuse me ;|
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 12:33 PM   #32
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

Quote:
Originally Posted by erikmartinez View Post
In your latest version, I found that the speed of opening the window with animation has decreased, as if the animation speed in general has become less. And also periodically I get an error:
Code:
(g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"
Code:
Error: Sexan_Pie3000.lua:169: attempt to perform arithmetic on a nil value (local 'begin_val')
I've fixed that few min ago
Code:
-- @version 0.1.4
EDIT: my bad uploading again 0.1.41
Sexan is offline   Reply With Quote
Old 03-06-2024, 12:38 PM   #33
erikmartinez
Human being with feelings
 
erikmartinez's Avatar
 
Join Date: Feb 2023
Location: Kazakhstan
Posts: 204
Default

Thanks for the instant support! Tell me, should there be such a strange figure in the form of a diagonal line?
erikmartinez is online now   Reply With Quote
Old 03-06-2024, 12:49 PM   #34
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

yeah that will be fixed soon
Sexan is offline   Reply With Quote
Old 03-06-2024, 01:13 PM   #35
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

While investigating freeze it seems that in some random click cases JS_API cannot detect whats happening with the shortcut key. It keeps reporting that key is held down while in key is in up state...
For example immediately right click after starting the script and it goes into that state (but in this case you are able to press the shortcut again and it will detect it again)

But in anycase reaper is not frozen here, its just I create big ImGui window so it can detect clicks "outside" of it and when "freeze" happens it just you are clicking in invisible imgui window and cannot pass it to reaper

Last edited by Sexan; 03-06-2024 at 01:18 PM.
Sexan is offline   Reply With Quote
Old 03-06-2024, 01:40 PM   #36
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,107
Default

I just drop by to say I love the cooking schwa in the first post.
nofish is offline   Reply With Quote
Old 03-06-2024, 02:46 PM   #37
Suzuki
Human being with feelings
 
Suzuki's Avatar
 
Join Date: Jul 2022
Location: Japan
Posts: 809
Default

Quote:
Originally Posted by Sexan View Post
Did not handle empty context yet
OK, I'm looking forward to it being implemented at some point!


How about using that "Search Actions" box in the custom menu creation context to fill in a name (and then press +, if it's empty it's named as "MENU N" as it is) for a new custom menu? I know we can change the menu name after the creation, but it might be faster and intuitive. Or do you plan on using it to filter menu names?

Also, the actions/menus name currently appears only in the center circle when hovering over them, but it would be handy if users can also assign "text icon" like in the native toolbar, not only icons. Probably it would be of help when there are no appropriate icons, and this is relating to the lack of "AUDIO SPECIFIC" icons problem mentioned in the op. It might be difficult to implement because of the lack of space though, but just an idea.

Last edited by Suzuki; 03-06-2024 at 03:00 PM.
Suzuki is offline   Reply With Quote
Old 03-06-2024, 03:18 PM   #38
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,682
Default

For text only I had tooltips in mind since there is no way to make this "universal" (short vs long names). Initial version was text only in the buttons but then you get into problem that buttons go over buttons if there are long names... so tooltips here IMHO is best option.

Setup script needs improvement still UX wise thats why I'm here for feedback. Filter in menus is supposed to filter them (but not implemented that yet since its empty on start)

Last edited by Sexan; 03-06-2024 at 03:24 PM.
Sexan is offline   Reply With Quote
Old 03-07-2024, 12:06 AM   #39
Kabraxis
Human being with feelings
 
Kabraxis's Avatar
 
Join Date: Feb 2015
Location: Turkey
Posts: 207
Default

It was about time someone coming up with a replacement of Lokasenna's Radial Menu, and I'm very glad it's you.

Way to go Sexan!
Kabraxis is offline   Reply With Quote
Old 03-07-2024, 01:48 AM   #40
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Location: Berlin
Posts: 2,198
Default

This looks incredible, way to go cat bro!

There does seem to be something off here on Linux. When I click the shortcut once, nothing happens (reaper loses focus). When I keep it pressed I see the pie quickly flashing in the combined center of my two monitors:

__________________
Featured scripts: REAPER Update UtilityLil ChordboxGridbox/Adaptive gridMX TunerRS5K LinkMIDI Editor Magic Donate💝: PayPal|ko-fi
FeedTheCat is online now   Reply With Quote
Reply

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 01:28 AM.


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