CommandPost / CommandPost

Workflow Enhancements for Creatives
https://commandpost.io
MIT License
415 stars 37 forks source link

"Open in Angle Editor" not included in menumap.json #132

Closed latenitefilms closed 7 years ago

latenitefilms commented 7 years ago

Given that "Open in Angle Editor" is quite a common menu request, should we manually add it to the .json file?

randomeizer commented 7 years ago

We could, or you could just use 'Open Clip' instead. On Tue, 27 Dec 2016 at 2:19 pm, Chris Hocking notifications@github.com wrote:

Assigned #132 https://github.com/fcpxhacks/fcpxhacks/issues/132 to @randomeizer https://github.com/randomeizer.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/fcpxhacks/fcpxhacks/issues/132#event-905394336, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbEw8vcHeRPs7TLo0qio00nQbdkF7sDks5rMJHQgaJpZM4LWBPB .

latenitefilms commented 7 years ago

Good idea! Although, I think the problem with that is, then I have no way of knowing if it's a multicam clip or not?

randomeizer commented 7 years ago

Are you using that to test if it's multicam? Simply adding it to menumap.js won't help prove that, since it just provides a number - it doesn't care if the menu actuality matches that text. On Tue, 27 Dec 2016 at 2:24 pm, Chris Hocking notifications@github.com wrote:

Good idea! Although, I think the problem with that is, then I have no way of knowing if it's a multicam clip or not?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/fcpxhacks/fcpxhacks/issues/132#issuecomment-269267815, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbEw30_QdP-wxJgRvw448BOA8Nc9jmqks5rMJMAgaJpZM4LWBPB .

latenitefilms commented 7 years ago

This is the code I'm currently using, which seems to work?

if menuBar:isEnabled("Clip", "Open in Angle Editor") then
    menuBar:selectMenu("Clip", "Open in Angle Editor")
else
    dialog.displayErrorMessage("Failed to open clip in Angle Editor.\n\nAre you sure the clip you have selected is a Multicam?\n\nError occured in multicamMatchFrame().")
    return "Failed"
end
randomeizer commented 7 years ago

It will work while FCPX is in English, because MenuBar will first check menumap.js for the menu you ask for, and if it can't find it, it will search manually. But I think you'll find it will fail in another language.

randomeizer commented 7 years ago

Probably a better solution longer-term is that I enhance the hs.finalcutpro API to be able to tell if the current timeline is the Angle Viewer.

latenitefilms commented 7 years ago

Although that will be useful to have in the API - that won't really help in this case, as we basically need to detect whether the currently selected clip is a multicam clip or not. AFAIK, the only way to do this is whether or not "Open in Angle Editor" exists. I might have to rethink how the multicam match frame currently works.

randomeizer commented 7 years ago

Well, the way it would be helpful is if you 'Open Clip' and you end up in the Angle Editor, it was a multicam clip. It would be prefereable to check beforehand, but it's at least one way of testing.

Multicam match is a bit gimped at the moment anway, thanks to us having no idea which angle is actually selected once we get into the Angle Editor anway, right?

randomeizer commented 7 years ago

FYI, there is some information about angles, etc. that ends up in the clipboard when you copy a multicam clip. Way more than is in the UI of the timeline. That might be a better place to get the information, but it will require some more advanced parsing of the clipboard XML.

latenitefilms commented 7 years ago

Of course! Genius!

I never thought about using the clipboard as a way to get information about clips - but that's a really clever workaround! That basically means we'll be able to get information about any clips really quickly and reliably. As you say, it will require some pretty crazy parsing of the clipboard XML - but I think long term, this will be really advantageous.

We can probably use this same technique to solve a bunch of other FCPX Hacks issues/workarounds too.

And yes, you're right - the multicam match frame feature is currently pretty useless. It was a lot more useful in 10.2.3, before Apple "jumped" to the correct timecode.

latenitefilms commented 7 years ago

Closing this issue. Lets fix this in issue #43.