Old 06-18-2019, 12:50 PM   #1
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,820
Default is it possible to drag and drop from script to project?

We can drag from explorer or finder into reaper, but say i have a GUI in lua and a button. Dragging this button would send "path/filename.wav" to be received on drop by reaper.

Is there any chance in extensions context to do it? I guess very probably but i don't know! Any idea?
deeb is offline   Reply With Quote
Old 06-18-2019, 01:12 PM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

You mean like drag&drop an Audio from a script-gui-window into the project?

Should be possible, as you can find out, if the mouse left the gui-window+use
BR_GetMouseCursorContext:
https://mespotin.uber.space/Ultrasch...eCursorContext

and
BR_GetMouseCursorContext_Position:
https://mespotin.uber.space/Ultrasch...ntext_Position

to know, where the mouse is currently placed.

If gfx.mousecap signals, that the left-mousebutton has been lifted, you insert the audio at that position.


The other way round, Item drag&drop into gfx-window is more difficult, cause if you leave the arrangeview to drop an item into a docked gfx-window, the arrangeview might scroll into that direction, as well as moving around the item.
Would need somehow blocking the mouse-messages sent to arrangeview using Julian's extension.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-18-2019, 06:27 PM   #3
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,820
Default

Quote:
Originally Posted by mespotine View Post
You mean like drag&drop an Audio from a script-gui-window into the project?

Should be possible, as you can find out, if the mouse left the gui-window+use
BR_GetMouseCursorContext:
https://mespotin.uber.space/Ultrasch...eCursorContext

and
BR_GetMouseCursorContext_Position:
https://mespotin.uber.space/Ultrasch...ntext_Position

to know, where the mouse is currently placed.

If gfx.mousecap signals, that the left-mousebutton has been lifted, you insert the audio at that position.
Thank you! very nice : ) and how about drag and dropping into a vst sampler?

Quote:
Originally Posted by mespotine View Post
The other way round, Item drag&drop into gfx-window is more difficult, cause if you leave the arrangeview to drop an item into a docked gfx-window, the arrangeview might scroll into that direction, as well as moving around the item.
Would need somehow blocking the mouse-messages sent to arrangeview using Julian's extension.
there is a drag and drop option in reaper:

Last edited by deeb; 06-18-2019 at 06:33 PM.
deeb is offline   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 09:26 PM.


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