07-16-2021, 07:02 AM | #1 |
Human being with feelings
Join Date: Jan 2006
Location: Montreal
Posts: 434
|
Sport Editing without typing the colon
When I import an item and want to place it on the timeline using HMSF position to sync it to image, I usually right click on the item and enter its position. I always have to enter the colon between the numbers.
Is there any way, action, script, etc.. that I can use where I dont have to type the colon? Thanks.
__________________
PSD Music |
07-17-2021, 12:43 PM | #2 |
Human being with feelings
Join Date: Jan 2006
Location: Montreal
Posts: 434
|
I did mean 'Spot editing' and not Sport editing'
__________________
PSD Music |
08-18-2021, 12:48 PM | #3 |
Human being with feelings
Join Date: Apr 2020
Location: UK
Posts: 79
|
Something like this?
Code:
_, hmsf = reaper.GetUserInputs("Item position", 1, "HMSF", "") hmsf = string.rep('0', 8 - #hmsf) .. hmsf hours = tonumber(string.sub(hmsf, -8, -7)) mins = tonumber(string.sub(hmsf, -6, -5)) secs = tonumber(string.sub(hmsf, -4, -3)) frames = tonumber(string.sub(hmsf, -2, -1)) framerate, _ = reaper.TimeMap_curFrameRate(0) new_pos = (hours * 3600) + (mins * 60) + (secs) + (frames * (1 / framerate)) sel_item = reaper.GetSelectedMediaItem(0, 0) reaper.SetMediaItemInfo_Value(sel_item, "D_POSITION", new_pos) Last edited by AB1; 08-20-2021 at 02:00 AM. Reason: Revised code to automatically add leading zeros as required. |
08-18-2021, 02:00 PM | #4 |
Human being with feelings
Join Date: Mar 2007
Posts: 3,978
|
|
08-19-2021, 09:35 AM | #5 |
Human being with feelings
Join Date: Feb 2019
Posts: 586
|
I recently made a feature request about this: https://forum.cockos.com/showthread.php?t=256296
No traction, but hopefully one of the devs gets a look at it. |
08-20-2021, 02:01 AM | #6 |
Human being with feelings
Join Date: Apr 2020
Location: UK
Posts: 79
|
Revised my code above to automatically add leading zeros as required.
|
Thread Tools | |
Display Modes | |
|
|