Old 06-18-2019, 12:50 PM   #1
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,327
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
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,555
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.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
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: 2,327
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 07:07 AM.


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