osara icon indicating copy to clipboard operation
osara copied to clipboard

Add project and take markers action

Open ScottChesworth opened this issue 1 year ago • 14 comments

This improves support for take markers, by making adding them context sensitive. Navigation of them will be added to the key map in the next commit.

ScottChesworth avatar Jul 06 '24 19:07 ScottChesworth

Build succeeded! Build osara pr1133-1569,e50f98de completed (commit https://github.com/jcsteh/osara/commit/e50f98dedd by @ScottChesworth) Downloads:

Windows
Mac

AppVeyorBot avatar Jul 06 '24 19:07 AppVeyorBot

Build succeeded! Build osara pr1133-1570,ee47c18f completed (commit https://github.com/jcsteh/osara/commit/ee47c18ff6 by @ScottChesworth) Downloads:

Windows
Mac

AppVeyorBot avatar Jul 06 '24 19:07 AppVeyorBot

Gotcha, I can refactor that. Did you have specific fakeFocus states in mind? I started off trying to use FOCUS_ITEM and FOCUS_RULER because I figured it would be nice to Page through long takes dropping markers, but it felt like the lesser used marker type was taking precedence too often that way, so I was gonna tell people to clear selection with Shift+Escape instead. Maybe I should try removing item selection from the conditionals, rely entirely on fakeFocus instead? Hmm.

ScottChesworth avatar Jul 10 '24 18:07 ScottChesworth

I was thinking take markers would only be FOCUS_ITEM, but I guess I can see why that would make this action far less useful, precisely because you can't drop take markers while moving through the project. I guess the guidance could be that you need to select the item under the cursor to force focus back to the item when you want to drop a take marker, but that seems quite annoying too. Ug.

I'm not really sure what to suggest here. I'm not sure we can really make this context sensitive without encountering problems like this. I don't love the idea of having to clear selection to drop a project marker; it feels a bit unintuitive. I'm probably a bit biased though because I use project markers all the time, but I've never used take markers and I don't see that changing any time soon. That said, I can just keep using the existing actions, so if I'm the odd one out here, that's fine.

jcsteh avatar Jul 10 '24 22:07 jcsteh

I don't think you'll be the odd one out, using it more tonight, I'm not liking it yet either. Will keep trying stuff. I'm exploring the context sensitive approach as there's nowhere logical left to put adding and editing take markers. T, A, K, E, M and R are all crammed.

ScottChesworth avatar Jul 10 '24 23:07 ScottChesworth

Refactored with a lot of help from @TimTam, changed to using fakeFocus instead of item selection because while not ideal, it makes the context sensitivity less weighted toward take which feels better in situ. I'll come back tomorrow and fix the key map conflict.

ScottChesworth avatar Jul 11 '24 21:07 ScottChesworth

Build succeeded! Build osara pr1133-1585,549d0a14 completed (commit https://github.com/jcsteh/osara/commit/549d0a140f by @ScottChesworth) Downloads:

Windows
Mac

AppVeyorBot avatar Jul 12 '24 20:07 AppVeyorBot

Wew, resolved conflicts. Can you take a gander at this approach when you get time @jcsteh?

ScottChesworth avatar Jul 12 '24 20:07 ScottChesworth

Build succeeded! Build osara pr1133-1587,a2ba8695 completed (commit https://github.com/jcsteh/osara/commit/a2ba869513 by @ScottChesworth) Downloads:

Windows
Mac

AppVeyorBot avatar Jul 26 '24 10:07 AppVeyorBot

Build succeeded! Build osara pr1133-1588,819a7b5e completed (commit https://github.com/jcsteh/osara/commit/819a7b5e41 by @ScottChesworth) Downloads:

Windows
Mac

AppVeyorBot avatar Jul 26 '24 10:07 AppVeyorBot

Just FYI @jcsteh, we tested explicitly with items that don't have takes and didn't cause a crash, probably because REAPER is smart enough to just return 0 if you hand it an invalid take. Its fair to ensure we don't cause unexpected behaviour, but REAPER is smart enough to don't crash too. An extra safety layer doesn't hurt though.

Timtam avatar Jul 26 '24 11:07 Timtam

Yeah, I did wonder whether REAPER might be smart enough to handle that. I'm fairly sure I've seen a crash by my failure to null check takes in the past, but maybe that wasn't a REAPEr function I was calling; I can't recall.

If you've explicitly tested it and it doesn't crash, I can live without that change.

jcsteh avatar Jul 26 '24 11:07 jcsteh

The commit I'm talking about is 8944a12bc3be0d16ba3d68c1a4fb89c1daa30b05, but maybe that was caused by something else I was doing with a null take there. My commit comment is a bit vague on the details of the actual crash. :)

jcsteh avatar Jul 26 '24 11:07 jcsteh

@ScottChesworth it's been a while, is it still planned to merge this?

RDMurray avatar Jan 14 '25 23:01 RDMurray

@ScottChesworth Any chance you can fix this up?

LeonarddeR avatar Jun 09 '25 19:06 LeonarddeR

Hmm I remember thinking context sensitivity wasn't working how I wanted yet last time I used the test build in this PR. It's been so long I can't recall what I meant to change though. Might end up closing it. I'll try running it for a while when I'm working tomorrow, then decide.

ScottChesworth avatar Jun 09 '25 20:06 ScottChesworth

Eventually retested this. It's too finicky to know what type of marker is going to be made so I'm closing. Will try to come up with something else.

ScottChesworth avatar Aug 14 '25 16:08 ScottChesworth