Open tokejepsen opened 6 years ago
It could be the launcher's responsibility to have a requests server to receive calls. The launcher would need to know who is logged in to be able to filter which calls to act upon.
Finally got around to testing this again, and got something working:
There are a lot of stuff todo before it works, but its promising now. The server is running with bottle which will be integrated with Avalon with https://github.com/getavalon/core/pull/524. Next things to do are take the data Kitsu gives us and find the corresponding asset. This is what we get:
{'personid': 'b01bae1e-f829-458a-a1eb-131bb66628cc', 'personemail': 'admin@example.com', 'projectid': '5bb7cdd5-15cc-4de2-9d4f-1332ca79dcde', 'currentpath': '/productions/5bb7cdd5-15cc-4de2-9d4f-1332ca79dcde/assets', 'currentserver': 'localhost', 'selection': '11a1d93b-3b98-4660-9ee1-aabd72c17578', 'entitytype': 'asset'}
Getting the Kitsu selection id and having metadata (https://github.com/cgwire/kitsu/issues/100), we should be able to find the asset in Avalon. After that its matter of passing this asset id to the launcher so users just need to choose their application to open.
Thought about this some more, and the launcher itself being present in the tray might be a good candidate to listen to a local port. Once a signal is received the launcher can push to the front in the correct context. This does introduce some overlap with CGWire and the launcher, because of the unique data incoming which would be different from other project trackers or sources.
the launcher itself being present in the tray might be a good candidate to listen to a local port.
Avalon Launcher can be launched multiple times which will have multiple running instances in tray, will that be a problem ?
Good point. Didn't think of that.
What are the use cases that? Is it used anywhere?
Thinking they all could change context.
What are the use cases that? Is it used anywhere?
Hmmm, I didn't concider it as a feature, haha. But I do find artists here, often accidentally launching multiple Launcher instances. Should concider as a bug, since you may have multiple listeners if implementing this into Launcher ?
Yeah, certainly a case that needs testing against. I would imagine that all the launcher will pop up in the right context, so either the user realises or doesn't care :)
Goal
Minimize the amount of navigation when using CGWire and Avalon.
Motivation
Currently you might be spending your time in CGWire when commenting and updating statuses on tasks, but when you want to launch the same task in Avalon, you have to navigate from the project level and find it.
Implementation
CGWire currently have custom actions, which we might be able to use to start the Avalon launcher in the correct context.