Releases: pyblish/pyblish-win
1.1.0
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()
- Added argument
- Updated Pyblish Nuke to 1.1.2
- Added argument
port
to setup()
- Added argument
- Updated Pyblish Houdini to 0.2.2
- Added argument
port
to setup()
- Added argument
- Updated Pyblish Integration to 0.1.3
- Updated Pyblish RPC to 0.2.2
1.0.9
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
andintegrate
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
1.0.6
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
Settings
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
Maintenance update to 1.0.4.
See 1.0.4 for full details about this massive update!
1.0.4
Pyblish for Windows 1.0.4
Version 1.0.4 is now available and includes the following submodules.
- Pyblish 1.1.0
- Pyblish QML 0.2.10
- Pyblish for Maya 1.0.14
- Pyblish for Nuke 1.0.3
- Pyblish for Houdini 1.1.0
- Pyblish RPC 0.1.0
- Pyblish Integration 0.1.0
Summary of new features
- Integrations
- Pyblish for Houdini added
- Core
- GUI
- 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.
- Download and run the installer.
- Or see manual installation instructions here
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 aspyblish-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:
- cd to
pyblish-win
- 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.
- In cases where you have either
process_context
orprocess_instance
, a simple search-and-replace toprocess
will work fine. - In cases where you have both, see below.
- During the transition phase, the distinction is made internally by looking for the existence of a
process_context
orprocess_instance
method.- If either exist, the plug-in is deemed "old-style" and is processed using the current implementation.
- If both
process
and eitherprocess_context
orprocess_instance
is present, old-style wins andprocess
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 usedconfig
is shorthand topyblish.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...
1.0.3
1.0.2
- Updating Pyblish for Maya to pyblish/pyblish-suite@53198b1
1.0.1
Initial release of Pyblish for Windows.
See Installation for information on how to get started!