-
Notifications
You must be signed in to change notification settings - Fork 46
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 #360 - quit Pyblish QML when Blender's operator is cancelled #361
Conversation
Nice one, but do still keep the reference to the server so it's clear what "quit()" refers to. It's a little too similar to |
The reason I just call
So I'm not sure how you would like me to change this. By using the |
Eeek. The terminology here isn't great; the "proxy" wraps the "server" with commands, like quit. Server in this case is Pyblish QML, where Blender is the client. Looks like I left out a line from my example. pyblish-qml/pyblish_qml/host.py Line 116 in 18826c8
With that, you should be able to call on
Double-eeek! I had also not seen this function. It's a context manager for a wrapper of a wrapper for the server. The proxy should be handling where the server has been killer or is missing. Let's stick with calling |
Okay, thanks for clarifying. I completely agree that I have another question: So many questions for such a simple thing... 😅 |
The API is only for external use. Internal modules shouldn't call it, unless it's an even higher-level of abstraction than the API (like e.g. |
Sorry, now I'm confused. Should I use |
I would do what other functions in the module do, unless there's a reason not to. pyblish-qml/pyblish_qml/host.py Lines 115 to 116 in 326c68d
|
To be on the safe side, I use: server = _state.get("currentServer")
if server:
proxy = ipc.server.Proxy(server)
proxy.quit() |
Looks good, unsure of why the Docker image fails for the tests.. hopefully it's temporary and doesn't involve this change. Thanks @jasperges |
This resolves #360