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

Implement pyblish-base/#250 #266

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion pyblish_qml/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,13 @@ def on_finished(plugins, context):
plugin)
plugin.compatibleInstances = list(i.id for i in instances)
else:
plugin.compatibleInstances = [context.id]

# When filtering to families at least a single instance
# with that family must be available for ContextPlugin
has_wildcard = "*" in plugin.families
has_one = pyblish.logic.instances_by_plugin(context, plugin) != []
if has_wildcard or has_one:
plugin.compatibleInstances = [context.id]

self.data["models"]["item"].reorder(context)

Expand Down Expand Up @@ -1046,4 +1052,12 @@ def iterator(plugins, context):
yield plugin, instance

else:
# When filtering to families at least a single instance with
# that family must be active in the current publish
no_wildcard = "*" not in plugin.families
no_active_instance = not any(inst.data.get("publish") for inst in instances)
Copy link
Member Author

Choose a reason for hiding this comment

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

@mottosso note that this is now a different check than what logic.py does in pyblish-base because there it explicitly checks for is not False. This could potentially start behaving different.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. Do try this locally first, then we'll need to update Lite and Base to follow suit. It's a backwards incompatible change, so odds are we'll put it behind a PYBLISH_SOMETHING_SOMETHING environment flag to be explicitly enabled.


if no_wildcard and no_active_instance:
continue

yield plugin, None