pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
127 stars 59 forks source link

Targets Workflow #320

Closed tokejepsen closed 7 years ago

tokejepsen commented 7 years ago

Motivation

This PR is to enable a workflow where you can define targets to aim you plugins for.

The targets work the same as the family, but will eventually be implemented in the GUIs differently.

tokejepsen commented 7 years ago

@mottosso What do you think about this solution?

Targets works in a similar way to families, but instead of comparing instances to a plugins targets, the plugins are filtered by the registered targets pyblish.api.registered_targets.

Since all plugins are registered with * as targets, this workflow is backwards compatible with existing plugins that has not overwritten the targets attribute.

Expecting pyblish-qml and pyblish-lite to implement a method for registering targets per session, so you can do this:

import pyblish_qml

pyblish_qml.show(targets=["custom_target"])
mottosso commented 7 years ago

Since all plugins are registered with * as targets, this workflow is backwards compatible with existing plugins that has not overwritten the targets attribute.

Goooood. That is critically important, thanks for testing and pointing this out.

Very well done. Just that one nitpick, then I'm happy to merge.

tokejepsen commented 7 years ago

All ready for a merge :)

mottosso commented 7 years ago

Looks good to me.

tokejepsen commented 7 years ago

Ready for merge and release :)

mottosso commented 7 years ago

Would you be kind enough to make a release statement for this one? Ideally with an example or two, along with motivation and usecase.

I've added you to the contributors list, where I thought you already were but there you go. :)

tokejepsen commented 7 years ago

Would you be kind enough to make a release statement for this one?

Sure, but I think I have done the versioning up incorrectly. Its currently 1.5.6, but it should be 1.5.0, right?

mottosso commented 7 years ago

Ah, yes that's true. You can fudge the number without a PR for this one, just hit the edit button on GitHub and make that change.