-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix context change on save #68
base: master
Are you sure you want to change the base?
Fix context change on save #68
Conversation
Engine.context_change() works in headless mode (shotgunsoftware#55)
For SG-7668: Updated Nuke version to support 11.2 (shotgunsoftware#57)
updating fork to latest
- on_load and on_save callbacks were refreshing all the engine apps every time the user saved/loaded even if the context was unchanged. - added if statment to prevent refresh if ctx was unchanged
Hi @kramester, thanks a lot for submitting this. Someone else has submitted something similar before, and when I tested it, it caused issues. It introduces a bug, where the sgtk menu remains disabled in the scenario where you were in a context (say shot 10, comp), then save file outside of the structure so that the menu becomes disabled. If you then save the file again back into the work directory with the same context as previously, the menu stays disabled. |
@pscadding, sounds like we just need to store the menu state and add that as a condition on whether to run the callbacks. The lag on save is the biggest issue here. Artists don't expect to have to wait a couple seconds for a quick CRTL+S save. Adding this condition made the saves instantaneous as they should be. The edge case you're describing is very much an edge case for us as we never save outside the pipeline. We're going to continue to use my patch here until you guys come up with something better. |
@kramester Yeah if the refreshing of the context is causing pain, then we should find a way to avoid the refresh. I've logged an internal ticket to look at this. |
This was causing some serious lag every time an artist would save.