shotgunsoftware / tk-aftereffects

Flow Production Tracking After Effects integration.
Other
10 stars 10 forks source link

Shotgun Panel context should be back to project context after closing the current AE project #12

Open mathurf opened 5 years ago

mathurf commented 5 years ago

When running AE Shotgun advanced integration (default2 config) and you saved your current AE project with Shotgun File Save, Shotgun Panel integration is set to that task context. But when closing that project or doing a File save via AE File save menu to a different path than the one configured in templates.yml, your current context should be back to the project context. So only Shotgun Open File, Save File and Panel are available.

Steps 1- Save your AE project via Shotgun File save = Your Shotgun Panel integration context is now set to your task (which is good) 2- Close you current project or do a File save via AE File save menu to a different path than the one configured in templates.yml = you are still in the task context set previously at step 1

martinminsel commented 5 years ago

I think the only way we can do this is actually having a QTimer, to observe the filepath of after effects, but I don't think that this solution is very nice, as we would periodically run javascript in main thread of aftereffects.

manneohrstrom commented 5 years ago

Meeting notes: Something analogous to this exists and works in the photoshop interface. There is an active document changed event in photoshop that we are hooked into.

We should figure out if there is something analogous in AE that we can use.

martinminsel commented 5 years ago

Hi @manneohrstrom , I experimented a little with this one. I couldn't find an event that I can use from After Effects, that notifies me everytime the project changed. So my approach was to look at the project with a QTimer, but as expected I experience race conditions, with other scripts, that use the rpc-layer (and javascript) at the same time. Especially the publish makes problems. Alternatively we could look at the window-name, but to implement this on mac AND windows we probably need a little more time. I would like to move this to v0.2 if possible.

manneohrstrom commented 5 years ago

cool. Great. Moving to v0.2!