Skip to content
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

Modal mode #269

Merged
merged 4 commits into from
Nov 14, 2017
Merged

Modal mode #269

merged 4 commits into from
Nov 14, 2017

Conversation

tokejepsen
Copy link
Member

This PR implements a modal mode and a way to switch between modal and non-modal.

The motivation for a modal mode is because of threading issues in Nuke reported in #264.

Usage

Non-modal is the default when using pyblish_qml.show().

To invoke modal mode you can either explicitly call pyblish_qml.show(modal=True) or set the environment variable os.environ["PYBLISH_QML_MODAL"] = "True".

@tokejepsen tokejepsen requested a review from mottosso November 9, 2017 14:22
@@ -5,9 +5,9 @@
)


def show(parent=None, targets=[]):
def show(parent=None, targets=[], modal=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iiiih while you're at it, could you remove the [] in targets?

Pass None and convert it to a list within function instead. Lists in signature arguments are mutable, which means if you modify the list, the next call the the function (without targets=) will behave differently. Very difficult to debug!

@mottosso
Copy link
Member

This looks good. Just that one nitpick, and then please version up and release.

@tokejepsen tokejepsen merged commit a6e00d7 into pyblish:master Nov 14, 2017
@tokejepsen tokejepsen deleted the modal_mode branch November 14, 2017 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants