Skip to content

Releases: pyblish/pyblish-win

1.1.0

11 Aug 13:31
Compare
Choose a tag to compare

Validate Only

New feature, validate-only from Pyblish QML.

Customised Ports

Maintenance fixes include being able to customise the ports at which clients communicate with Pyblish QML.

import pyblish_maya
pyblish_maya.setup(port=10001)  # Defaults to 9001

Following this command, Maya will attempt to claim port 10001 unless it is already occupied by either another host, or another unrelated process on the local machine. This ensures that ports can never run out, enabling a host count of ~40.000.

Pyblish X 0.1.7 - Full list of changes

  • Updated Pyblish to 1.1.6
    • Bugfix: Duplicate instances was allowed (#219)
    • Added pyblish.plugin.plugins_from_module
  • Updated Pyblish QML to 0.3.0
    • Feature: Added button Validate (#115)
    • Enhancement: Added the ability to customise the port
      at which QML distributes ports for connecting clients. (#114)
    • Enhancement: Added additional metadata to terminal
  • Updated Pyblish Maya to 1.1.2
    • Added argument port to setup()
  • Updated Pyblish Nuke to 1.1.2
    • Added argument port to setup()
  • Updated Pyblish Houdini to 0.2.2
    • Added argument port to setup()
  • Updated Pyblish Integration to 0.1.3
  • Updated Pyblish RPC to 0.2.2

1.0.9

04 Aug 17:35
Compare
Choose a tag to compare

Here's a summary of the most important changes.

Pyblish X version 0.1.6

  • Updated Pyblish to 1.1.5
  • Updated Pyblish QML to 0.2.12
  • Updated Pyblish Maya to 1.1.1
  • Updated Pyblish Nuke to 1.1.1
  • Updated Pyblish Houdini to 0.2.1

Pyblish version 1.1.5

  • Feature: Added support for "MyInstance" in context
  • Enhancement: Removing the need for @pyblish.api.log (#213)
  • Bugfix: Negative collectors (#210)
  • Bugfix: Decrementing order actually works now. (#206)
  • Feature: Dict-like getting of instances from Context (#208)
  • Feature: Host registration (#177)
  • collect and integrate now available via pyblish.util
  • "asset" available in context.data("result") for forwards compatibility

Pyblish QML version 0.2.12

  • Bugfix: GUI hangs on plug-ins subclassed from Plugin (#110)

1.0.8

09 Jul 09:47
Compare
Choose a tag to compare

Pyblish 1.1.3

  • Logic: Excluding SimplePlugin and Selectors from Default test (See #198)
  • BACKWARDS INCOMPATIBLE order now supports being decremented (see #199)

Pyblish Maya 1.0.15

  • Fix for menu item appearing in the wrong spot (#43)

1.0.6

22 Jun 15:47
Compare
Choose a tag to compare

Updated Pyblish QML to 0.2.11

Version 0.2.11

  • Added support for Pyblish RPC 0.1.1
  • Added Instance to log messages.
  • PROBATION SUPPORT for pyblish_qml.settings
  • PROBATION SUPPORT for context.set_data("label")

Instance to log messages

untitled

Settings

untitled

Usage

THE FOLLOWING FEATURES ARE ON PROBATION AND MAY GET PULLED

Customise Context label and Window title.

import pyblish_qml
pyblish_qml.settings.WindowTitle = "My Title"
pyblish_qml.settings.WindowSize = (430, 600)
pyblish_qml.settings.ContextLabel = "The World"

Each setting is applied when the GUI is shown, which means you can change them any time before then, including between subsequent runs.

Alternatively, set context label during processing.

class CollectContextLabel(pyblish.api.Collector):
  def process(self, context):
    context.set_data("label", "The World")

The GUI will read the current label after having processed all collectors. Any change after Collection will not be visible in the GUI.

1.0.5

09 Jun 16:32
Compare
Choose a tag to compare

Maintenance update to 1.0.4.

See 1.0.4 for full details about this massive update!

1.0.4

08 Jun 07:38
Compare
Choose a tag to compare

Pyblish for Windows 1.0.4

Version 1.0.4 is now available and includes the following submodules.

Summary of new features

  • Integrations
  • Core
    • Feature: Dependency Injection (see #127)
    • Feature: SimplePlugin (see #186)
    • Feature: In-memory plug-ins (see #140)
    • Feature: Custom test (see #183)
    • Feature: create_instance(name, **kwargs) (see #187)
    • Preview: Asset (see #188)
  • GUI
    • Feature: Override plug-in label (see #85
    • Feature: Shared instance (see #96)
    • Feature: Context visible in list of items (see #90)
  • CLI
    • Bugfixes

See here for a full list of changes.




Introduction

This release is focused on lowering the learning curve for newcomers, primarily via the core library, yet some of the changes have also found their way into the GUI.

The update is completely backwards compatible, but encourages you to update your plug-ins to the new DI-style detailed below.

If you encounter any issues, feel free to talk about it in the forum thread




Installation

For a new install.

To update.

Between 1.0.3 and 1.0.4 there has been some refactoring that may affect your integration of Pyblish into your pipeline.

  • The previous root /python directory has been renamed /pythonpath
  • Pyblish Suite has been superseeded by Pyblish X which means..
  • ..that the inner packages are now located within /lib/pyblish-x/modules instead of /lib/pyblish-suite., such as pyblish-qml.

Using the installer

Uninstall your existing copy (due to the refactoring) and then re-install.

Using the command-line

The update.bat has been updated in this release, which means you can't run the one you have from 1.0.3.

Instead, you can:

  1. cd to pyblish-win
  2. Copy/paste this into a terminal.
git checkout master
git reset --hard
git pull
git submodule update --init --recursive
git clean -xffd

I'd recommend doing this locally first, before pushing things into production, due to the way file deletion/updating works with permissions and files being in use etc.

If you run into any issues, feel free to post on the forums.




Transition Guide

In terms of mixing old- and new-style plug-ins, here's what you need to keep in mind.

  1. In cases where you have either process_context or process_instance, a simple search-and-replace to process will work fine.
  2. In cases where you have both, see below.
  3. During the transition phase, the distinction is made internally by looking for the existence of a process_context or process_instance method.
    1. If either exist, the plug-in is deemed "old-style" and is processed using the current implementation.
    2. If both process and either process_context or process_instance is present, old-style wins and process will not be called.

Processing logic

The manner in which process() is called is roughly this.

    ______
   |      |  incl. `instance`
   | args |------------------
   |______|                  |
      |                      |
      | not incl. `instance` |
      |                      |
 _____v_____           ______|_____
|           |         |            |
| process() |<--------|  for each  |
|___________|         |____________|


# If the arguments include `instance`, then `process()`
# will be called once every instance. Otherwise it is
# called once.
#
# Unless the plug-in is *limited* to a subset of families.
# E.g. `families = ["oneFamily"]` in which case nothing
# happens unless there is an `instance` of a supported
# family.

For a full look, see the source.

Both process_context and process_instance

The current behaviour of this is for process_context to be processed first, followed by process_instance. This behaviour isn't possible anymore. You can however process both in the same function.

def process(self, context, process):
  # do things

In case you do have both, process_instance will overwrite process_context due to your plug-in being re-written to a it's Dependency Injection equivalent at run-time.

def process_context(self, context):
  # I will not be called. :(

def process_instance(self, instance):
  # Runs as usual

Old-first

The reason for looking for old-style methods before new-style is because of the newly introduced ability to use __init__. In cases where __init__ is used, and process not being implemented, the plug-in is still deemed new-style as __init__ is assumed to not have been in use.




Dependency Injection

The most prominent change is this.

Before illustrating how it works, it's important to point out that this is the new way of writing plug-ins. It means that the current way of implementing plug-ins still works, but are to be considered deprecated and no longer supported.

Now, on to the fun stuff!

As Usual

import pyblish.api

class ValidateInstances(pyblish.api.Validator):
    def process(self, instance):
        pass

This does as you would expect. Which is to process once for every instance, regardless of family (see below for new family defaults).

import pyblish.api

class SelectInstances(pyblish.api.Selector):
    def process(self, context):
        pass

In the same spirit, this plug-in runs once and has access to the context. This is nothing new.

Plug-in Independency

What is new is that you can choose to process nothing.

import pyblish.api

class SimpleExtractScene(pyblish.api.Extractor):
    def process(self):
        cmds.file("myfile.mb", exportAll=True)

This plug-in runs once, as when processing the context, but doesn't have access to either the current Instance nor Context. This can be useful for plug-ins that are completely independent of it's environment and state.

Default Services

What is also new is that you can also request other so-called "services".

import pyblish.api

class CustomValidator(pyblish.api.Validator):
    def process(self, user, time):
        fname = "myfile_v001_%s_%s.mb" % (user, time())
        cmds.file(fname, exportAll=True)

In which case the services user and time are injected into the plug-in right before it's about to start processing. Each of which are default services that ship with the Pyblish base install.

Here are all of them.

register_service("user", getpass.getuser())
register_service("time", pyblish.lib.time)
register_service("config", pyblish.api.config)
  • user is available by value, as it is not expected to change at run-time.
  • time is callable, as it provides unique values each time it is used
  • config is shorthand to pyblish.api.config

User Defined Services

You can also register your own services..

def say(something, yell=False):
    print(something.upper() if yell else something)

pyblish.api.register_service(say)

..and then request them via your plug-ins.

import pyblish.api

class ValidateUniverse(pyblish.api.Validator):
    def process(self, say):
        say("I just wanted to say, Hello World!", yell=True)

Service Coordination

Services are shared amongst plug-ins.

datastore = {"softFailure": False}
pyblish.api.register_service("store", datastore)

Which means you can use it to communicate and pass information inbetween them.

class ValidatePrimary(pyblish.api.Validator):
    def process(self, instance, store):
        if instance.has_data("I'm kind of valid.."):
            store["softFailure"] = True


class ValidateBackup(pyblish.api.Validator):
    def process(self, instance, store):
        if store["softFailure"] is True:
            # Do alternate validation

Or to provide globally accessible data, such as a database connection.

import ftrack
import pyblish.api
proxy = ftrack.ServerProxy("http://myaddress.ftrack.com")
pyblish.api.register_service("ftrack", proxy)

Distributed Development

With services, you can defer development of a plug-in between more than a single developer allowing for faster iteration times and improved version control.

As a plug-in is deve...

Read more

1.0.3

16 May 10:54
Compare
Choose a tag to compare

Maintenance update only.

  • Updating Pyblish to 1.0.16
  • Adding preliminary support for Pyblish for Houdini

1.0.2

24 Apr 10:15
Compare
Choose a tag to compare

1.0.1

24 Apr 09:23
Compare
Choose a tag to compare

Initial release of Pyblish for Windows.

See Installation for information on how to get started!