Go Back   Cockos Incorporated Forums > REAPER Forums > JSFX and ReaScript Discussion

Reply
 
Thread Tools Display Modes
Old 10-17-2018, 07:16 AM   #1
tufb
Human being with feelings
 
Join Date: Dec 2017
Location: Germany
Posts: 47
Default Lua: Replace item under mouse cursor; Copy and replace selected items

Copy and replace selected items

bfut_Copy item to clipboard.lua
bfut_Paste item from clipboard to selected items (replace).lua


Copies and replaces selected items, preserving position, length, mute status, etc. in the replaced items. Requires SWS extension.

How to use:
1. Select media item.
2. Run script "bfut_Copy item to clipboard".
3. Select other media item(s).
4. Run script "bfut_Paste item from clipboard to selected items (replace)".

NB: I use a hotkey combination similar to Ctrl+c, Ctrl+v.





Replace item under mouse cursor

bfut_Replace item under mouse cursor with selected item.lua

Replaces item under mouse cursor with selected item, preserving position, length, mute status, etc. in the replaced item. Requires SWS extension. (This is a full rewrite of a similar script by spk77.)

How to use:

1. Select media item.
2. Hover mouse over another item.
3. Run the script.

NB: This requires setting a hotkey, or mouse modifier.

Installation
Directly from https://github.com/bfut/ReaScripts or
Copy and paste this URL in Extensions > ReaPack > Import a repository:
Code:
https://github.com/bfut/ReaScripts/raw/master/index.xml
tufb is offline   Reply With Quote
Old 10-27-2018, 03:01 PM   #2
tufb
Human being with feelings
 
Join Date: Dec 2017
Location: Germany
Posts: 47
Default

Now with screencaptures!

Copy and replace selected items




Replace item under mouse cursor




Some more details:

Item locking status is handled as follows...
1) A locked target item will not be replaced.
2) When a target item is replaced with a locked source item, the replaced target item will not be locked. However, if the source item is locked to a specific take, the replaced target item will still be locked to that take.


Replaced items get all new IGUIDs and GUIDs, so you don't end up with an unpredictable RPP.


Target MIDI items will are pooled with source MIDI items by default, because it's easy to unpool them. This behavior can be changed in script code.

Last edited by tufb; 10-27-2018 at 03:09 PM.
tufb 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 10:25 PM.


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