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

Targets workflow. #258

Merged
merged 4 commits into from
Aug 28, 2017
Merged

Targets workflow. #258

merged 4 commits into from
Aug 28, 2017

Conversation

tokejepsen
Copy link
Member

Motivation

This PR is to facilitate the targets workflow that was introduced in https://github.com/pyblish/pyblish-base/releases/tag/1.5.0.

Implementation

The implementation for pyblish-qml is done so you can exclusively target plugins. For a demonstration you can execute:

$ python -m pyblish_qml --demo --targets studio

This will only load two plugins that are targeted directly for studio.
To get all plugins you can target both default and studio:

$ python -m pyblish_qml --demo --targets default studio

You can also specify the targets when showing pyblish-qml from a host:

import pyblish_qml
pyblish_qml.show(targets=["studio"])

Because the matching is using pyblish.api.plugins_by_targets its important to get pyblish/pyblish-base#321 merged first.

Lastly I'm not sure whether there is better way than passing the targets argument all the way through to the controller?

When no targets are specified, append the registered targets to "default" target.
@tokejepsen
Copy link
Member Author

Latest update facilitates registering new targets in the host.

import pyblish_qml
import pyblish.api

pyblish.api.register_target("studio")
pyblish_qml.show()

@tokejepsen
Copy link
Member Author

This has been used for a week in production. Proceeding to merging.

@tokejepsen tokejepsen merged commit 4d1024a into pyblish:master Aug 28, 2017
@tokejepsen tokejepsen deleted the targets_workflow branch August 28, 2017 08:47
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.

1 participant